You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Struts Two <st...@yahoo.ca> on 2008/05/28 15:10:58 UTC

autocomplete value in javascript

I am using struts 2.0.11.1 autocompleter tag with ajax theme (with its id and name set to 'host'). For some reason I am not able to retrive its value in a javascript function. I have tried the following api:
    ------document.getElementById('host');
    ------document.getElementByName('host');
    ------document.forms[0].host.value
I even tried it with prototype API as follows:
     --------$F('host')
I also tried the above api's with 'hostKey' but of no use. I am using xhtml and by looking at the genetated code for autocomplete I noticed it is not a properly closed xml tag so I kind of expect xml api's fail. Is there anyway that I can retrieve the value of that tag in a javascript before a submit is performed.


      __________________________________________________________________
Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php