David, I am not able to figure out the following:
Let us say I have a page A.jsp in which I have a hidden iframe called B.jsp. Now this page A.jsp has the select onchange call which in turn sets some values in the form present in the hidden iframe B.jsp and submits the form in the iframe B.jsp. Now on submit , is the action forward supposed to forward to A.jsp which has a javascript in it? I tried doing this but I am not able to populate the fields. Please let me know. Thanks --- [EMAIL PROTECTED] wrote: > Here you go... > ----- Forwarded by David Hay/Lex/Lexmark on > 09/07/2004 05:33 PM ----- > |---------+----------------------------> > | | David Hay | > | | | > | | 09/02/2004 01:55 | > | | PM | > | | | > |---------+----------------------------> > > >------------------------------------------------------------------------------------------------------------------------| > | > > | > | To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > | > | cc: > > | > | Subject: Re: dynamically change the > dropdown list from a database...(Document link: > David Hay) | > > >------------------------------------------------------------------------------------------------------------------------| > > > > Don't have any code handy, but it's quite > straightforward: > > - create a hidden frame > - on the select's onchange() do a submit on a form > in the hidden frame to > an action that gets the information from the > database, passing in the > relevant parameter > - have the action forward to a jsp which is just a > javascript call to > update the other select box - probably easiest just > to delete the select > box options, iterate through the through the > collection returned and for > each one create a javascript call on the other frame > that adds an option > for it > > let me know if you have any qu's. > > cheers, > > David > > > > |---------+----------------------------> > | | Erik Weber | > | | <[EMAIL PROTECTED]| > | | ring.com> | > | | | > | | 09/02/2004 01:14 | > | | PM | > | | Please respond to| > | | "Struts Users | > | | Mailing List" | > | | | > |---------+----------------------------> > > >------------------------------------------------------------------------------------------------------------------------| > | > > | > | To: Struts Users Mailing List > <[EMAIL PROTECTED]> > | > | cc: > > | > | Subject: Re: dynamically change the > dropdown list from a database... > | > > >------------------------------------------------------------------------------------------------------------------------| > > > > > Do you have an example of this? > > Thanks, > Erik > > > [EMAIL PROTECTED] wrote: > > >Or you could get fancy and use a hidden frame which > pulls the information > >from the database (via an Action of course!) in 1) > - thus avoiding the > >annoying reload. > > > > > > > >|---------+----------------------------> > >| | Yves Sy | > >| | <[EMAIL PROTECTED]| > >| | m> | > >| | | > >| | 09/02/2004 12:32 | > >| | PM | > >| | Please respond to| > >| | "Struts Users | > >| | Mailing List" | > >| | | > >|---------+----------------------------> > > > >------------------------------------------------------------------------------------------------------------------------| > > > | > | > > | To: Struts Users Mailing List > <[EMAIL PROTECTED]> > | > > | cc: > | > > | Subject: Re: dynamically change the > dropdown list from a > database... > | > > > >------------------------------------------------------------------------------------------------------------------------| > > > > > > > > > > >There are 2 ways to go about this: > > > >1) use an onchange() handler in your select-A that > submits the new > >value and retrieves the corresponding values for > select-B everytime > >there's a change; > > > >2) pre-load all possibilities and use javascript to > change the values > >of select-B that depends on A. This option is > practical only for small > >amounts of combinations of data. > > > >I've personally used option 2 before. Check out: > >http://www.mattkruse.com/javascript/dynamicoptionlist/source.html > > > >-Regards- > >Yves > > > >On Thu, 2 Sep 2004 12:21:06 -0400, Shilpa Nalgonda > ><[EMAIL PROTECTED]> wrote: > > > > > >>I am having problem dynamically display the > dropdown list from database. > >> > >>There are two dropdown list boxes A and B, > >>when the user changes options in dropdown A, the > dropdown B should also > >>change dynamically from databse. > >> > >>Both A and B use html select tag. > >> > >>Dropdown A and B are inside the shipReprt.jsp. > >> > >>I am trying to submit to the same jsp on change > event of dropdown A .. > >>It does not work, can anyone plesae suggest. I am > not struts > >> > >> > >though...below > > > > > >>is the code for Dropdown A.. > >>I have to pass the vendor parameter to dropdown B > so that i can query > >>database with this parameter... > >> > >><select name="vendor" > onchange="document.form2.submit();">"> > >> <option value="MERC01" selected>MP > BookMaker</option> > >> <option > value="ADOBE01">ADOBE</option> > >> </select> </td> > >> > >> <form name="form2" method="post" > action="shipReprt.jsp"> > >> <% String partner = > request.getParameter("vendor"); > >> out.println("Size : " + partner); > >> %> > === message truncated === __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]