Hello,
The code below runs well on IE 6 and 7.
On Firefox it loads the first time but throws the following error on
reloads.
Error: top is not defined
Source File: top.myIFrameBod y();
Line: 1
On Mozilla it never works due to permissions not allowing access to
myIFramBody.
On Netscape 7.2 it loads the first time, but throws security errors
on reloads.
On Safari it throws this error:
TypeError - Value undefined (result of expression top.myIFrameBod y) is
not object. about:blank
At first I thought it was a caching problem per
http://developer.mozilla.org/en/docs...ox_1.5_caching
So I added:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-STORE">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
but it made no difference.
Any ideas?
Thank you.
<html>
<head>
<script type="text/javascript">
myIFrameBody = function() {
var data = [
'<html><head>' ,
'</head><body>',
'Hello World: ',
Math.random(),
'</body></html>'
].join('\r\n');
return data;
}
</script>
</head>
<body>
<iframe src="javascript :top.myIFrameBo dy();" width="400"
height="50"></iframe>
<br>
</body>
</html>