User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 427,789 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,760 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting

Combo Box In Jsp+ Ajax Urgent Please Help Me

Join Date: Feb 2006
Posts: 1,460
Reputation: masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice 
Rep Power: 9
Solved Threads: 131
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: Combo Box In Jsp+ Ajax Urgent Please Help Me

  #3  
Sep 22nd, 2006
If these lists are not too long, you would be better off generting a few hidden tags on your form and use pure JavaScript to pull values from the hidden tags to populate your second list. So say your values lists are as follows:

1st List Entry     Values for second list
AAAAA              11111,22222,33333,44444
BBBBB              11111,33333,66666,77777
CCCCC             55555,66666,88888,99999
then you would create 5 hidden tags with the name AAAAA and each one would contain one of the corresponding values. The same for BBBBB and CCCCC.

Then in java script using an onSelect call, you would then populate the second list using the values "hidden" under the same name as the selected value. As long as the lists are not too large, this would be a very good way to solve your problem.

If you still wish to use AJAX, then I would suggest you find some AJAX tutorial sites and get at least a general idea of how AJAX works and how you program it. Then try to do this, and if you have a any specific questions on how to continue find an AJAX and/or JavaScript forum site to ask these questions.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
All times are GMT -4. The time now is 1:45 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC