Menu
hello everyone.
I want to traverse all the way up to the parent of all the iframes in my page.
When i use
<script laguage=”javascript”>
par=window.location;
ch=parent.par;
document.write(ch);
</script>
it will print out the parent. However when run within an iframe, it will just print out “undefined”.
Ex: page1 has the script in it
page2 has an <iframe src=”page1.html”>
page3 has an <iframe src=”page2.html”>
when on page1.html it prints correctly. When on page2.html or page3.html it will print out undefined.
What is the matter?