Click to See Complete Forum and Search --> : Automatic dropdown box population


NatuScape
11-25-2002, 07:13 AM
Hi all!

I am trying to use a JavaScript snipet I got from http://javascript.internet.com/forms/dropdown-box-population.html to populate a dropdown box depending on the choice made in the first box. The problem is that my form is an ASP kinda complicated thing (generated by FP 2002 - please don't hurt me! :D) and when I insert the portion of the code meant to go in the form, it doesn't work. It only works if I isolate this code in a separate form using the name "myChoices", which is the name the author of the code used. When I changed the name of the "big" form to myChoices I got no action either...

Can anyone help me figure out where to change the code so that it works, or if it just won't work inside a "database results" region such as the one I have?

Thanks a bunch!!!!

Natalia

Vladdy
11-25-2002, 07:35 AM
It is hard to find what your problem is without seeing your code. Until then the only advice I can give you is: Start -> Settings -> Control Panel -> Add/Remove Prorams -> FrontPage -> Uninstall :D :D

NatuScape
11-25-2002, 07:49 AM
Here's the code, knock yourself out! The form with the selection choices is at the very end and I put it in a separate form because that's how it works. The thing is I need it to work together with the ASP-driven part...

Vladdy
11-25-2002, 08:07 AM
FP can make routine things easier, but once you try to step out of the box, it becomes a hell. So my original advice stands.
Fundamentally, there is no reason why the script (with a few modifications) would not work with ASP generated page. The data for the root select control can be written directly into the options. The data that goes into the select control that depends on the root select control choice should be written into the JS array.
If you think, that is over your head I can develop the page for you (no FP though - I do not like making things more complicated than they have to be :D ).

NatuScape
11-25-2002, 08:29 AM
Thanks for the offer, but I need to learn how to make it work myself... I'll keep banging at it until it does!! :D

NatuScape
11-25-2002, 09:41 AM
Hi again!!

I am trying to figure out why the JS that I downloaded from http://javascript.internet.com/forms/dropdown-box-population.html doens't work when I try to customize it. What I found is that changing the form in any way, such as getting rid of the third selection box, or adding an innocent text input field makes the script not work. I'm attaching the download here in the hope a good soul can check it out and give me pointers on how to get it going with only two options and with more stuff in the form.

Thanks!

Natalia