Body onload inside iframe

Ok, now I am refining my question. Below is a schematic of my situation

----my Javascript code here----
<script>
</script>
</html>
<body>
<div id=“content”>
—form controls in “left”------
<div id =“left”>
<div id=“right”>
<Iframe id=“there” src=“0.html”>
—inside 0.html------
<body onload=“”>

previously I have used “onload” in the Iframe, this only works with mozilla and possibly IE6. Can’t tell as I have a mac and have IE5mac. This is the code that I have used previously:

<iframe SRC="0.html#Pg1" onload="showObj('Pg'+document.forms['chapage'].elements['pge'].value);
		alert('loaded');" name="there" id="there" width="100%"
		 height="100%" Frameborder="0" marginheight="0" marginwidth="0" scrolling="yes" >
		</iframe>

here is the javascript code for show Obj()

function showObj(objid)
{
	parent.frames['there'].document.getElementById(objid).style.display='block';
	parent.frames['there'].document.getElementById(objid).style.zindex='5';
}

I have found that the alert works on the 0.html <body onload> shown in the schematic above. How can I modify the above code to access the required data in the form controls, that are outside of the iframe?

(I assume that the modified javascript will have to be added to the 0.html as well as the modified onload code)

-b

After the trouble I had last night, I gave up to early.

Here’s the answer:


<script language="JavaScript">function showObj(objid)
{
	parent.frames['there'].document.getElementById(objid).style.display='block';
	parent.frames['there'].document.getElementById(objid).style.zindex='5';
}</script>
</head>

<body onload="showObj('Pg'+parent.document.forms['chapage'].elements['pge'].value);">

Thanks anyway. Hope that this helps someone-someday.

-b