|
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
____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________ |
- [jdjlist] RE: JSP TAGS Interaction Greg Nudelman
- [jdjlist] RE: JSP TAGS Interaction Scot Mcphee
- [jdjlist] RE: JSP TAGS Interaction Tomm Carr
- [jdjlist] RE: JSP TAGS Interaction U. Penski
- [jdjlist] RE: JSP TAGS Interaction Greg Nudelman
- [jdjlist] RE: JSP TAGS Interaction Tomm Carr
- [jdjlist] RE: JSP TAGS Interaction Greg Nudelman
- [jdjlist] RE: JSP TAGS Interaction Tomm Carr
- [jdjlist] RE: JSP TAGS Interaction U. Penski
- [jdjlist] Applet display Abhijit
- [jdjlist] Re: Applet display Sistem Analisti
