NerdConcepts Posted July 7, 2008 Share Posted July 7, 2008 The error says Line: 295 Char: 32 Error: object doesn't support this property or method Code: 0 URL: xx Here is my code for the select box.... <form method="post" name="vehicleselect" id="vehicleselect" class="niceform" style="border: 0; padding: 0; margin: 0;"> <select name="vehicle" id="vehicle" onChange="document.vehicleselect.submit()" class="width_200_height_150"> <option value="1">Test Vehicle 1</option> <option value="2">Test Vehicle 2</option> <option value="3">Test Vehicle 3</option> </select> <noscript><input type="submit" name="submit" id="submit" value="update"></noscript> <input type="hidden" name="subVehicleSelect" value="TRUE" /> </form> This just started happening out of the blue. Everything was working perfectly with IE7 and 6 and now the page loads just fine. When I make a selection is when the "Error on page" at the bottom pops up. Firefox is still working fine though. Any clues? Quote Link to comment Share on other sites More sharing options...
NerdConcepts Posted July 7, 2008 Author Share Posted July 7, 2008 Ok, I did figure out what I causing this. It is the "Niceforms 1.0" script(s). I am running the fix for it, that enables the Select box onChange to work properly. But the problem is, that doesn't seem to work anymore. I've applied a few different "fixes" for this and nothing seems to fix it. Here is the command that is throwing the error. function selectMe(selectFieldId,linkNo,selectNo) { //feed selected option to the actual select field selectField = document.getElementById(selectFieldId); value = selectField.value; // FIX CODE for(var k = 0; k < selectField.options.length; k++) { if(k==linkNo) {selectField.options[k].selected = "selected";} else {selectField.options[k].selected = "";} } //show selected option textVar = document.getElementById("mySelectText"+selectNo); var newText = document.createTextNode(selectField.options[linkNo].text); textVar.replaceChild(newText, textVar.childNodes[0]); if(value!=selectField.value) {eval(selectField.getAttribute("onChange").replace(/this.value/g, selectField.value));} // FIX CODE } If I remove the two lines that have "// FIX CODE" after them, no error, but the onchange doesn't do anything. I have no idea what is going on now. Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted July 7, 2008 Share Posted July 7, 2008 What is it that your select element is supposed to be doing, exactly? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.