I believe XML would be the best choice for this. Using XML, you can download
the entire information(including Country-City relationship) at one go.
This would help in three ways:
1. Eliminate the need to get back to the server for getting cities related
to a country
2. No array manipulation needs to be done.
3. No need to reload the full page again.
Hope this helps
Regards
Ashish
> ----------
> From: Aggarwal, Pawan[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list about Java Server Pages specification and
> reference
> Sent: Monday, May 22, 2000 2:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Client side selection
>
>
> Does that mean If I go for the reloading option then
> I need to go to the database table .pickup relevant towns and then refresh
> the page
>
> Can I do something like this!!
> I get country-city relationship data from the database(not much heavy in
> my case) when I come to this servlet
> Store this in an array which can be used through javascript to update my
> list onChange event
> The reason behind is that the array which contains the relationship will
> always be updated,
>
> Please advice
>
>
> -----Original Message-----
> From: Veronique Dupierris [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, May 19, 2000 7:11 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Client side selection
>
> I think you should reload your page with this new param set. the
> first
> time country = all for your second list and when you reload
> your page with country = france :) you can then load only those cities
> for the second list. If you don't want to reload yur page, you should
> have store all informations (all cities for all country) and then use
> javascript code to update your list using an onChange event.
>
> Hope I understood your question
> veronique
>
>
> "Aggarwal, Pawan" a �crit :
>
> >
> >
> > Hi All,
> >
> > Can you people suggest me something..
> >
> > I am using a servlet which displays 2 drop down boxes...
> > If I make a selection in the first one then I need to update the
> > filter list in the second one...
> >
> > For example if the first dropdown is for Country ..
> > Now the moment I select any country without refreshing/changing the
> > page
> > I want the second dropdown to be updated with the cities in that
> > country only...
> >
> > How can I do that?
> >
> > Thanks,
> >
>
>
> ==========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets