Have you looked at the rendered HTML? AFAIK you'd need to use the Dojo mechanisms for accessing Dojo component values.
Dave --- On Wed, 12/10/08, aum strut <[EMAIL PROTECTED]> wrote: > From: aum strut <[EMAIL PROTECTED]> > Subject: Validating Autocompleter using javascript > To: "Struts Users Mailing List" <user@struts.apache.org> > Date: Wednesday, December 10, 2008, 11:48 AM > Do any one have any suggestion regarding this problem or do > i need to drop > down the idea of using autocompleter??? > > Hi all, > > i am struck in a simple problem but not able to proceed as > i m unable to > find any solution for this. I am using struts2 UI tags and > in order to > validate the user input i am using javascript for > validation(Currently not > in a position to use validation frame work). > > everything was going ok but now i have to use auocompleter > and here > javascript validation is not working.i have created a > seperated javascript > file and validating the user input using this file. > > My javascript validation is working fine(even displaying > errors) up to the > point it encounters autocompleter but it stops validating > the input fields > after it. > > below is the code i m using to validtate autocompleter: > > > < > s:autocompleter name="addressPO.city" > forceValidOption="true" theme="simple" > id="addressPO.city" > cssClass="inputText" > cssStyle="width:125px" list="{'Andaman > and Nicobar','Andhra Pradesh','Arunachal > Pradesh','Assam'}"/> > > > > and the code to validate this is: > > document.getElementById( > 'addressPO.city').value = > document.getElementById('addressPO.city').value.trim(); > > > if(document.getElementById('addressPO.city').value > == null || > document.getElementById('addressPO.city').value == > "" ) > > { > > alert("error"); > > } > > following is the error Mozilla is showing to me > > *Error: document.getElementById("addressPO.city") > has no properties* > > * > *Any suggestion for this are welcomed > > Pleaes suggest me where i am doing wrong in order to > validate this > autocomplete. > > thanks in advance, > > umesh --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]