SitePoint Sponsor |
|
User Tag List
Results 1 to 1 of 1
-
Aug 10, 2007, 15:10 #1
Getting 'checked' value of checkbox in IE
Hi,
I'm using the following code to dynamically add checkboxes to a form: (Using Jquery ):
In the HTML code:
Code:<ul id="list"> </ul>
Code:for (x=0;x < words.length; x++) { //Some code here $("#list").append("<li><input type='text' id='word_" + y + "' value='" + words[x] + "'> <input type='checkbox' name='test' id='sep_" + y + "'>"); }
Code:<ul id="list"> <li> <input type='text' id='word_1' value='something'> <input type='checkbox' name='test' id='sep_1'> </li> <li> <input type='text' id='word_2' value='something'> <input type='checkbox' name='test' id='sep_2'> </li> </ul>
Code:for (x=1; x <= keywordCount; x++) { //Some code here var temp=document.getElementById('sep_' + x); seps=(temp.checked) ? 'checked' : ''; }
Line: 91
Char: 3
Error: Object doesn't support this property or method
Any ideas?
Bookmarks