p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Professional (http://p2p.wrox.com/forumdisplay.php?f=57)
-   -   Corresponding values change in comboboxes (http://p2p.wrox.com/showthread.php?t=42247)

gaurav_jain2403 May 8th, 2006 03:04 AM

Corresponding values change in comboboxes
hello friends,
I have got the problem. I have seen on some websites that when we select some value in one combobox, corresponding values are loaded into the other combobox using client-side coding.
For e.g. If I select my area of specialization as 'I.T.' then the values displayed in other combobox are related to I.T. field. I want to do something like this but dont want to connect to server for retrieving the values. Can someone tell me how can I do this?
Thank you.

Gaurav Jain

jbenson001 May 8th, 2006 01:44 PM

You would have to connect to the server even if you used client side AJAX. The only way not to hit the DB is to hard code the values using JavaScript. I am assuming you don't want to hard code the values.

melvik May 9th, 2006 12:50 AM

dear Gaurav:
I think the best way woul dbe retriveing the data once & use JavaScript to set data for ur combo change!
more performance & less data Conn.
many wasy r to do it, like cash in a xml & then read it & ...
or set an array & work with or ...

be happy!

Hovik Melkomian.

vkshrestha May 16th, 2006 12:29 PM

When data is small (as it seems to be), using javascript is the best approach.
If large amount of that, either you should use AJAX or do page refresh.

sh.rajkumar May 19th, 2006 10:03 AM

You can do one thing ,If your data is small then you can
hardcore this by storing the values in the arraylist and
then retrieving accordingly.

rajkumar sharma

All times are GMT -4. The time now is 07:25 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.