Hey Thomas, This isn't really an App Engine question, but more of a javascript question. I'd suggest asking at something like stack overflow. Also, google it: https://www.google.com/search?sourceid=chrome&ie=UTF-8&q=dependent+select+menus
Robert On Thu, Feb 23, 2012 at 15:32, Thomas Guirden <[email protected]> wrote: > hi > > Is there a neat way to update a section of a web page when working > with Java and GAE? And passing parameters (e.g. To load data from the > datastore according to some criteria)? > > I want to show a second drop down list (<select> tag) depending on the > selection done on the first dropdown (<select> tag). E.g. First drop > down selects the customer, second drop down selects the order, all on > the same screen. > > I thought of two ways to do this... Both a little bit cumbersome and > my instinct tells me there MUST be a cleaner way to do things. > > Both methods use the HTML 5 object tag (or iframe tag) and onChange of > the first dropdown, I change innerHTML of the object tag to load the > 2nd sub-page (containing the 2nd <select> tag). However to pass > parameters from the first page to the second using this approach I > must either build and call a form using Java/JavaScript (to pass > parameters using POST method) or else save the parameter into the > datastore from within the first page, and then read this parameter > from the 2nd sub-page. And then build the <select> tag using this > parameter. > > I cannot simply use .innerHTML='<select><option value="">etc...' > because I get problems (I think) with too many single and double > quotes when building the first page > (resp.getwriter().println(".... .innerHTML ='<select><option value= > \"\">etc...'. > > Setting innerHTML to simple text without using <> and quotes works > fine. I will try to post code later from my development PC. > > Thanks for any ideas you may have! > > T > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
