How to apply "cloneNode()" on NS7?
Hello every body!
The following script works OK for ie6, but I do not know how to modified to make it work on ns7.
In other words, how may I cloneNode an IFRAME object with ns7?
FR= document.all.IFRM.cloneNode(); attribs="";
for(at=0; at < FR.attributes.length; at++)
if(FR.attributes[at].specified == true) attribs+= FR.attributes[at].name+"\n";
<IFRAME id="IFRM" src="about:blank" style="border:1px solid black; position:absolute; top:20px; left:30px; width:350px; height:300px;">
your code fails because Moz doesn't support IE's proprietory document.all collection!
to access the iframe, you need to use the document.getElementById method, which, as of version 5+ browsers, is cross-browser compatible.
Thanks Dear jbot for trying to help.
What you have noted is correct and I know it, but by changing the statement:
the script still fails on NS7, giving me the following error message - which I am not able to benefit thereof:
Error: uncaught exception: [Exception... "Not enough arguments [nsIDOMHTMLIFrameElement.cloneNode]"!
Do you know what should I do accordingly?
that's because you probably can't clone a frame, iframe or otherwise. what exactly are you trying to achieve - it may be better to use a full CSS layout instead.
Thank you very much indeed Dear jbot!
I will try again utilizing your advice.
have a good day.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)