You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sutiwan Kariya <Su...@tisco.co.th> on 2002/08/20 08:24:40 UTC

Non-Struts related : input one text field then show description in another field

Need somebody help!
I have one jsp page with one zip code text field and one state text field.
 I want when user input the zipcode text , onblur that zip code field then
the state text field shows the state related to that zipcode.

what kind of bean or tag lib do I need to perform this task? I want it to
perform on client side(javascript) .

Note:Zipcode and State are stored in the database


Look forward to hearing the solution....

Sutiwan W.





********************************************************************
This E-mail and any files transmitted with it are confidential
and intended for the sole use of the individual or entity
to whom they are addressed. If you have received this 
E-mail in error please notify the system manager.  This E-mail
message has been swept for the presence of computer
viruses.
********************************************************************


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Non-Struts related : input one text field then show description in another field

Posted by neal <ne...@yahoo.com>.
Sounds like you're saying that you want to cause the page to submit on the
onBlur event, correct?

Try something like this:

	<input type="text" onBlur="this.form.submit()" />


And then course you would do the lookup server-side and return the page with
the revised list of zipcodes, per the chosen state.  This is a similar sort
of thing to what ASP.NET does with postback.  Note though that onBlur
probably won't work with NN4 and possibly not NN6...last I checked it was an
event only listened to by MSIE.  Also note that this implies making a lot of
round trips to the server, which might decrease performance of you app in
high-traffic scenarios.

Cheers.
Neal



-----Original Message-----
From: Sutiwan Kariya [mailto:Sutiwan@tisco.co.th]
Sent: Monday, August 19, 2002 11:25 PM
To: struts-user@jakarta.apache.org
Subject: Non-Struts related : input one text field then show description
in another field


Need somebody help!
I have one jsp page with one zip code text field and one state text field.
 I want when user input the zipcode text , onblur that zip code field then
the state text field shows the state related to that zipcode.

what kind of bean or tag lib do I need to perform this task? I want it to
perform on client side(javascript) .

Note:Zipcode and State are stored in the database


Look forward to hearing the solution....

Sutiwan W.





********************************************************************
This E-mail and any files transmitted with it are confidential
and intended for the sole use of the individual or entity
to whom they are addressed. If you have received this
E-mail in error please notify the system manager.  This E-mail
message has been swept for the presence of computer
viruses.
********************************************************************


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>