Re: accessing dynamic generated dom element with javascript in IE

Chris <[email protected]>
Newsgroups gmane.comp.web.dom.wdf
Message-ID <[email protected]>
A lot's been written on this list on this issue. The summary is that 
your form elements don't entirely exist - IE can't properly create form 
elements on the fly. Search this Group list for "IE dynamic form 
elements" - you'll find a lot of good info on this problem. A lot more 
than my repeating it here could get you!

-Chris


Sleeping Beauty wrote:

>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
>  
>



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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.