I have a problem and donīt know how to fix it, I have this code
Code JavaScript:var apply=document.getElementById("regulartextfields"); var counterrors=0; if (apply.addEventListener) { apply.addEventListener("change", checkfield_1, false); } else if (apply.attachEvent) { apply.attachEvent("onchange", checkfield_1); }
which works perfectly fine in both internet explorer and firefox for the following case
Code HTML4Strict:<input type="text" size="15" id="regulartextfields">
But only works in firefox in this case
Code HTML4Strict:<div id="regulartextfields"> <input type="text" size="15"/> <input type="text" size="15"/> <input type="text" size="15"/> <input type="text" size="15"/> </div>
In the last one firefox will attach an event to each field but it will stop working completely in IE, can someone tell me how I should go about attaching an event to multiple elements in IE?



Reply With Quote
Bookmarks