Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onChange event handeler in IE 6.x 1

Status
Not open for further replies.

RennyB

Programmer
Joined
Feb 1, 2006
Messages
2
Location
US
I wrote a simpe script that will disable a group of <select> form elements based on the value on another <select>. Works fine in Opera and FF, but in IE 6.x I can make the function fire once, but if I change the select option again nothing happens. Here's the function.

function disableDelay(){
if (document.connectionType.periodicUpdates.value=="No"){
document.connectionType.updateDelay.disabled=true;
} else document.connectionType.updateDelay.disabled=false;

Here's where I call the funtion.

<select name="periodicUpdates" onChange=disableDelay() >
<option <%=(synchronizationSettingBoolean) ? "selected" : ""%> >Yes</option>
<option <%=(synchronizationSettingBoolean) ? "" : "selected"%> >No</option>
</select>

Any ideas on how to make this work in IE?
 
Provide VALUE attributes for your options.

<option <%=(synchronizationSettingBoolean) ? "selected" : ""%> [!]value='Yes'[/!]>Yes</option>
<option <%=(synchronizationSettingBoolean) ? "" : "selected"%> [!]value='No'[/!]>No</option>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! [infinity]
 
Thanks! That fixed it.
 
Good! I guess Opera and FF must default their VALUEs to the option-text if the VALUE is not specified. Good to know!

Thanks for the star...

Dave


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! [infinity]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top