Dear Nathan:
 
I assume you mean that you have 3 drop-down HTML selects on the same page, A B C.
When user picks A, B and C content changes.
 
Correct?
 
If you need this to change right there on the client, then OH YES, you need much JavaScript voodoo medicine. However:
 
Young Jedi, path to the Dark Side of Programming that way lies! 
Afraid, you will be!
Better way, there is:
 
JSP is a server-side technology and you will need a "server trip" in beween the changes. If your user is willing to wait (much more scalable):
 
1) give them only 1 box, A
2) onSelect of A insert submitForm function that will submit this form to a JSP and create B
3) page coes back with A set selected to the user's choice, and correct B options.
4) user selects B
5) onSelect of B insert submitForm function that will submit this form to a JSP and create C
6) user selects C
7) result comes back
 
note that your JSP has to be smart enough to realize if the user (re-)makes some other A selection even when she sees A + B or even all three A, B, C. You may need to save her previous A and B selections in a Session, or
 
BETTER:
 
send it back to the user in a hidden fields! WAY COOL!
 
previouslySelectedAValue 
previouslySelectedBValue
 
So you can:
 
if previouslySelectedAValue == null
    go to step 1
else if previouslySelectedBValue == null
    go to step 3  
else if AValue != previouslySelectedAValue
    go to step 2 //refresh selections
else if BValue != previouslySelectedBValue
   go to step 5 //refresh selections
else //user gave you all 3 values
   go to step 7 //whew! we're done!
 
OK, this maybe more then you needed,
 
Greg
 
 
 
 
 
 
 
 
-----Original Message-----
From: nathan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 9:59 PM
To: JDJList
Subject: [jdjlist] JSP TAGS Interaction

I am not sure how to handle the following.
 
I need to a  WEB From which three drop down having Grand parent, Parent, Child Relation. If the user select an option on
the Grand Parent the Parent dropdown should show the items filtered based on the selection. The same relation holds good for
parent and child drop down. 
 
I am trying to create a Reusable JSP Custom tag Which will show items on the dropdown.
 
I am not sure how do I send information form Grand Parent to Parent Dropdown?
 
I am not sure this cannot be achieved with JSP TAGS. 
 
Do I need to use JAVA SCRIPT to achive this?
 
I Welcome  suggestions.
 
Thanks in Advance.
 
Prasad
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to