I am having a problem getting a php script running from a child frame to be able to access another child frame from that script file. The code is as follows;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>set</title>
</head>
<frameset rows="50%,50%">
<frame name="upper" src="upper.html">
<frame name="lower" src="http://localhost/test/lower.php">
</frameset>"
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>upper</title>
</head>
<body>
<P>upper</p>
</body>
</html>
<html>
<head>
<title>lower</title>
</head>
<body>
<?php
print("lower<br>\n");
print("<script language=\"JavaScript\">\n");
print("document.write(parent.frames.length);\n");
print("var NewDoc = parent.frames[\"upper\"].document.open(\"text/html\", \"replace\");\n");
print("NewDoc.writeln(\"test2\");\n");
print("NewDoc.close();\n");
print("</script>\n");
?>
</body>
</html>
I am wondering if there is any advice to be given becasue the php file gets an access denied error and the javascript declaration print line. I do not know what else to do to get the php file to access the other child frame?
php and frames help needed
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA