aspquestions Posted October 11, 2009 Share Posted October 11, 2009 Hello,I know that in other languages there is a selected_index changed event for drop down boxes which is called whenever a different item is selected in the drop down box. Is there a similar event in javascript so I could do something line <drop down box OnSelectedIndexchanged = ""> etc? Link to comment Share on other sites More sharing options...
jeffman Posted October 11, 2009 Share Posted October 11, 2009 <select name="blah" id="myselect" onchange="func()">or in the script itself (best practice):document.getElementById("myselect").onchange = func;Assignments like this generally are embedded in a window.onload handler, to ensure that the page element exists when you try to get a reference to it. (The DOM is constructed serially.) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.