dynamic selector list

M

mcraven.2

I'm creating a web form that has two selectors. You make a selection
in the first selector and a specific list is to show up in the second
selector based on a database query. The first selector is also filled
in by a database query. Can someone provide me with some guidance on
how to do this? I'm thinking I want to use the onchange event of the
first selector but I don't know how. What would I call with the
onchange event? Would I refresh the form or call a servlet that would
fill in the second selector? For reference, I'm using JSP.
 
T

Toby Inkster

mcraven.2 said:
I'm creating a web form that has two selectors. You make a selection
in the first selector and a specific list is to show up in the second
selector based on a database query. The first selector is also filled
in by a database query. Can someone provide me with some guidance on
how to do this?

Google "AJAX", but provide a non-Javascript alternative.
 
A

Andy Dingley

I'm creating a web form that has two selectors. You make a selection
in the first selector and a specific list is to show up in the second
selector based on a database query.

Go find yourself an AJAX tutorial - the "Ajax in Action" book perhaps
for starters.
 
D

David Dorward

I'm creating a web form that has two selectors. You make a selection
in the first selector and a specific list is to show up in the second
selector based on a database query.

I've been sucking all the data out of the database and storing it in
the page. You can see an example of an early stage version at
http://dorward.me.uk/tmp/select.html . This is unfinished so will need
some work, but you might find it useful as a starting point. (The
script is almost finished, but isn't live anywhere at present and I
can't put the alpha online for various reasons).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top