davem2312
07-17-2006, 08:25 PM
Hi all,
I am trying to make dynamic HTML form menus. When someone selects an option in one menu, I want the others to change. So here is my problem.
My script works perfectly in Firefox, but does not in IE. I have diagnosed the problem to this:
function change_subtype(chosen_fence) {
fence = (chosen_fence[chosen_fence.selectedIndex].value);
<!-- There are some other lines of code in here -->
}
function change_height(chosen_subtype) {
subtype = (chosen_subtype[chosen_subtype.selectedIndex].value);
<!-- Theres some other stuff here, but this line i know is the problem.-->
}
The top function works in both IE and Firefox, but the bottom one only works in Firefox, NOT IE. The two menus that this apply to are as shown here.
<select name="type" onchange="javascipt:change_subtype(this)">
<!-- There are some other lines of code in here -->
<select name="subtype" onchange="javascript:change_height(this)">
I have tried renaming the variable, and storing something else into it. Doing this, I have diagnosed that the problem lies in the calling of the variable from the form, not in the assignment or use of the variable.
I hope this is enough information to help me. Thanks all.
I am trying to make dynamic HTML form menus. When someone selects an option in one menu, I want the others to change. So here is my problem.
My script works perfectly in Firefox, but does not in IE. I have diagnosed the problem to this:
function change_subtype(chosen_fence) {
fence = (chosen_fence[chosen_fence.selectedIndex].value);
<!-- There are some other lines of code in here -->
}
function change_height(chosen_subtype) {
subtype = (chosen_subtype[chosen_subtype.selectedIndex].value);
<!-- Theres some other stuff here, but this line i know is the problem.-->
}
The top function works in both IE and Firefox, but the bottom one only works in Firefox, NOT IE. The two menus that this apply to are as shown here.
<select name="type" onchange="javascipt:change_subtype(this)">
<!-- There are some other lines of code in here -->
<select name="subtype" onchange="javascript:change_height(this)">
I have tried renaming the variable, and storing something else into it. Doing this, I have diagnosed that the problem lies in the calling of the variable from the form, not in the assignment or use of the variable.
I hope this is enough information to help me. Thanks all.