View Full Version : Help with drop downs

07-08-2007, 02:43 AM
I have a form site that needs to do the following

Drop Down 1: Choose a Property Type
Drop Down 2: Choose a Value (based on DD1 Selection)
Drop Down 3: Choose a Payment Type (based on DD2 Selection)
Drop Down 4 or Text Box: With the Price (based on DD3 Selection)

I have the first three Drop downs doing what I want, I cannot get the forth drop down to give me anything,

The code is very long so I posted it to a website where you can see the code and the way it is supposed to act..



07-08-2007, 09:07 PM
Giving it a quick look:
One thing that makes it so long is you have the same function "selectChange()" repeated three times. It is only needed once.

This is totally untested:
for ( x = 0; x < ItemArray.length; x++ ) {
if ( GroupArray[x] == control.value ) {
if (controlToPopulate.name == 'A') {
controlToPopulate.value = x;
} else {
myEle = document.createElement("option") ;
var txt = document.createTextNode(ItemArray[x]);

<input type="text" id="fourthChoice" name="A" size="32" style="font-weight: 700">

07-09-2007, 04:22 AM
Thanks for the help, I have it working know

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum