tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walker Chris <walk...@dc-link.co.uk>
Subject RE: Using drop down boxes in JSP
Date Wed, 17 Sep 2003 11:48:41 GMT
You have to remember where things are happening: the change to the dropdown
is only known to server-side components when the form is submitted.

It is possible to submit the form in the onchange event of a select box, but
I wouldn't advise it unless you can guarantee a fast response (e.g. on an
intranet).

If you do this it's a good idea to add code to disable all controls on the
screen
just after the form submits.

Sorry, this OT for Tomcat.

Chris

-----Original Message-----
From: Anson Zeall [mailto:zeallous@bigpond.net.au]
Sent: 17 September 2003 11:54
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Hi,
   Thanks for the reply. But, hmm.....i was thinking of using
onChange...and then....process the parameter via servlet?

Anson

-----Original Message-----
From: Walker Chris [mailto:walkerc@dc-link.co.uk]
Sent: Wednesday, September 17, 2003 8:45 PM
To: 'Tomcat Users List'
Subject: RE: Using drop down boxes in JSP


Anson,

You will have to write client JavaScript to do this.

OTTOMH, attach a function to the onChange event of your SELECT tag.  The

object representing the tag will probably be accessible as
document.all.yourTagId,
or possibly something else, depending on the browser object model.  This
object will expose a collection corresponding to all the OPTION tags and
a property to indicate which is selected.

I'd recommend you to find a definition of the browser object model and
to check out sites specializing in JavaScript.

Chris Walker



-----Original Message-----
From: Anson Zeall [mailto:zeallous@bigpond.net.au]
Sent: 17 September 2003 11:31
To: Tomcat Users List
Subject: Using drop down boxes in JSP


Hi people,

    I want to know, what is the best way to scan the option chosen each
time the user selects an option from the drop down menu. Like..most of
the pages I surfed to, they only showed how to make a drop down box..and
then see what the option was chosen ONLY when the button is pressed. Is
there any way I can scan the input, as soon as the user chooses an
option from the drop down box?

Regards,


Anson




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

Mime
View raw message