derekmceachern
11-04-2003, 10:50 AM
I have a web page where the user selects an item from a select box and when they make that selection I want to change the information on the web page.
The variable i is the index of the selected item in form "maturity". In another form called "hidden_data" on the same page there is a hidden variable called description_1. What I want to do is set a text box to the value of description_1 but reference it with i.
Current Code:
function maturityChange () {
var i = 0;
i=document.maturity.maturity_item.options[document.maturity.maturity_item.selectedIndex].value;
document.maturity.description.value=document.hidden_data.description_i.value;
}
What I need is in the above code to have i evaluated to 1, how do I do this?
The variable i is the index of the selected item in form "maturity". In another form called "hidden_data" on the same page there is a hidden variable called description_1. What I want to do is set a text box to the value of description_1 but reference it with i.
Current Code:
function maturityChange () {
var i = 0;
i=document.maturity.maturity_item.options[document.maturity.maturity_item.selectedIndex].value;
document.maturity.description.value=document.hidden_data.description_i.value;
}
What I need is in the above code to have i evaluated to 1, how do I do this?