For example I have a javascript on one of my pages (page.html) that writes out as given below.
Is there any way I can access the variable “gotoURL” in the “content.html” from the Javascript block in the “page.html” and change it’s value ?
HTML Page 1 (page.html)
<SCRIPT LANGUAGE=“JavaScript”>
document.write (“<IFRAME src=‘/content.html’ WIDTH=‘468’ HEIGHT=‘60’>”);
doucment.write (“</IFRAME>”);
</SCRIPT>
HTML Page 2 (content.html)
<html>
<head>
<title>Banner</title>
<SCRIPT LANGUAGE=“JavaScript”>
var gotoUrl = “http://www.mydomain.com”;
</SCRIPT>
<script>
function linkUrl()
{
var homewindow = window.open(gotoUrl);
}
</script>
</head>
<body>
<a href=“javascript:linkUrl()”>
<img src=“/images/468x60.gif” name=“banner” border=“0”>
</a>
</body>
</html>