Well i hate javascript lol or at least i do until i get used to it
Im using the following
[CODE]<script language=”javascript”>
/* Script for disabling form elements and only enabling them when the select menu is changed for product 2 */
function enableFielda()
{
document.step2.product2a.disabled=false;
document.step2.product2b.disabled=false;
document.step2.product2c.disabled=false;
document.step2.product2d.disabled=false;
document.step2.product2e.disabled=false;
document.step2.product2f.disabled=false;
}
/* Script for disabling form elements when the select menu is changed to a none item */
function disableFielda()
{
document.step2.product2a.disabled=true;
document.step2.product2b.disabled=true;
document.step2.product2c.disabled=true;
document.step2.product2d.disabled=true;
document.step2.product2e.disabled=true;
document.step2.product2f.disabled=true;
}
/* Script for disabling form elements and only enabling them when the select menu is changed for product 3 */
function enableFieldb()
{
document.step2.product3a.disabled=false;
document.step2.product3b.disabled=false;
document.step2.product3c.disabled=false;
document.step2.product3d.disabled=false;
document.step2.product3e.disabled=false;
document.step2.product3f.disabled=false;
}
/* Script for disabling form elements when the select menu is changed to a none item */
function disableFieldb()
{
document.step2.product3a.disabled=true;
document.step2.product3b.disabled=true;
document.step2.product3c.disabled=true;
document.step2.product3d.disabled=true;
document.step2.product3e.disabled=true;
document.step2.product3f.disabled=true;
}
</script>
This is the code im using on a form element
[CODE]<select size=”1″ name=”productpr2″ style=”color: #2D8458;”>
<option selected onChange=”javascript:disableFielda()”></option>
<option value=”Large Figure, Pants:15.00″ onChange=”javascript:enableFielda()”>Lg Figure (Pants) $15</option>
<option value=”Small Figure, Pants:13.00″ onChange=”javascript:enableFielda()”>Sm Figure (Pants) $13</option>
<option value=”Large Figure, Dress:15.00″ onChange=”javascript:enableFielda()”>Lg Figure (Dress) $15</option>
<option value=”Small Figure, Dress:13.00″ onChange=”javascript:enableFielda()”>Sm Figure (Dress) $13</option>
<option value=”Dog:5.00″ onChange=”javascript:enableFielda()”>Dog $5.00</option>
<option value=”Cat:5.00″ onChange=”javascript:enableFielda()”>Cat $5.00</option>
</select>
The whole idea is that several form elements are enabled when someone chooses a value from a drop down list and then disabled if they chose the blank option in that drop down field
However this works in firefox but not in IE 7 so what am i doing wrong
can anyone explain this to me??