Hello,
I have a .html link like this:
<a href="#" onclick="return popup('myPage.html');">Link here</a>
I have two frame on my page:
<frameset rows="90%,10%" border="yes" frameborder="1">
<frame name="frame1" src="Content.html"/>
<frame name="frame2" src="Footer.html"/>
</frameset>
In the "frame1" I have that link and with this script I try to reach the frame2 to create a new frame into:
<script type="text/javascript">
function popup(url) {
var runform = parent.frame2.getElementsByTagName("body")[0];
var newform = parent.frame2.createElement("iframe");
newform.setAttribute("src",url);
newform.setAttribute("allowTransparency","true");
newform.setAttribute("width","100%");
newform.setAttribute("height","30");
newform.setAttribute("scrolling","No");
runform.appendChild(newform);
return false;
}
</script>
When I execute this script I get this failure:
"Object doesnt support this property or method"
Can please somebody tell me what I'm doing wrong?
I have a .html link like this:
<a href="#" onclick="return popup('myPage.html');">Link here</a>
I have two frame on my page:
<frameset rows="90%,10%" border="yes" frameborder="1">
<frame name="frame1" src="Content.html"/>
<frame name="frame2" src="Footer.html"/>
</frameset>
In the "frame1" I have that link and with this script I try to reach the frame2 to create a new frame into:
<script type="text/javascript">
function popup(url) {
var runform = parent.frame2.getElementsByTagName("body")[0];
var newform = parent.frame2.createElement("iframe");
newform.setAttribute("src",url);
newform.setAttribute("allowTransparency","true");
newform.setAttribute("width","100%");
newform.setAttribute("height","30");
newform.setAttribute("scrolling","No");
runform.appendChild(newform);
return false;
}
</script>
When I execute this script I get this failure:
"Object doesnt support this property or method"
Can please somebody tell me what I'm doing wrong?