Another way is to use frames. Put the country SELECT in one frame and the city SELECT in another. Then have the first SELECT's onChange() do a location.replace() on the second frame. Yours, Tom -----Original Message----- From: Jay Woody [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 21, 2000 10:36 AM To: [EMAIL PROTECTED] Subject: Re: JSP and Form Pulldown that depends on another Form Pulldown Peter, I have also found this to be more difficult than it sounds. One way that I have worked around it is to put the dropdowns<SELECT> in different <FORM> tags. Then, in the onChange event of the first dropdown, call a javascript function that resubmits the form with the second dropdown. The second form/dropdown will take the choice of the first dropdown as a parameter in the Where clause that populates the list. In the javascript function, you would have code like this: document.forms.tableForm.submit(); Hope this helps, Jay Woody ----- Original Message ----- From: "Peter Pilgrim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 21, 2000 5:39 AM Subject: JSP and Form Pulldown that depends on another Form Pulldown > Hello > > I have an architectural / design with Forms, JSP, and dependencies between > HTML Form Elements. > > Can JSP help me with a spec rquirement? > > I have a HTML Screen with two pulldowns <select>...</select> > Let's call the first pulldown "country" and fill it with > > { united kindom, france } > > Let's call the second one "city" and fill with either > > `{ london, manchester, glasgow, cardiff, belfast } > or > `{ paris, nice, lyon, marseille, bordeaux, grenoble, st etienne } > or > whatever the selected item the first pulldown has. > > See the problem ? Second pulldown depends on the first. > > It is easy to write this as a static HTML web page if the data is static > and bind it with a little JavaScript. > > But what if the values for the HTML Option element all come from a database. > I think you write some sort of OptionPulldownBean. But how do get these > beans depended on one another? > How would you write this requirement in JSP ( and the MVC pattern (sic) )? > > Any ideas appreciated. > > -- > Peter Pilgrim > G.O.A.T > "The Greatest of All Time" > > > > -- > > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
