accessing dynamic generated dom element with javascript in IE
"Sleeping Beauty" <[email protected]>
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <[email protected]> |
I a creating a site for entering tests
the instuctor can add questions whenever he needs and the question and
answer fields are appended with the questions counter
I've created a javascript function to validate the questions
the problem is that it doesn't work in IE it worked in firefox
this is how I access the fields
for (i=1 ; i<= counter ; i++)
{
if ((q = myform.elements["Q_" + i]))
{
if ( q.value == "")
{
str = str + 'enter a question plz'
}
}
}
in IE q is considered undefined!
is there any other option, coz I need the code to work in IE
thank you
aurora
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/9rHolB/TM
--------------------------------------------------------------------~->
Unsubscribe
[email protected]
List info
http://www.quirksmode.org/dom/list.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wdf-dom/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/