Skip to content

Instantly share code, notes, and snippets.

Created June 9, 2016 08:27
Show Gist options
  • Save anonymous/1ce52336a88f8fc1d17bf0326d38faea to your computer and use it in GitHub Desktop.
Save anonymous/1ce52336a88f8fc1d17bf0326d38faea to your computer and use it in GitHub Desktop.
test load frames
<?php
if (array_key_exists("QUERY_STRING", $_SERVER)) {
if ($_SERVER["QUERY_STRING"] == "getmain") {
echo '<!doctype html>
<html>
<frameset rows="40%,60%">
<frameset cols="50%,50%">
<frame src="?gettl" name="tl">
<frame src="?gettr" name="tr">
</frameset>
<frame src="?getbot" name="bottom">
</frameset>
</html>
'; exit;
}
if ($_SERVER["QUERY_STRING"] == "gettl") {
echo '<!doctype html>
<html>
<body>
<h2>TL <button type="button" id="thisbtn">This!</button> </h2>
</body>
</html>
'; exit;
}
if ($_SERVER["QUERY_STRING"] == "gettr") {
echo '<!doctype html>
<html>
<body>
<h3>TR</h3>
</body>
</html>
'; exit;
}
if ($_SERVER["QUERY_STRING"] == "getbot") {
echo '<!doctype html>
<html>
<body>
<h4>BTM</h4>
</body>
</html>
'; exit;
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css">
#mainholder {
border: 2px solid gray;
width: 70%; height: 150px;
}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<h1>Hello World!</h1>
<iframe id="mainholder" src="?getmain"></iframe>
</body>
</html>
<!-- manually copied from Firefox inspector, once entire page loaded -->
<html style="cursor: auto ! important;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
#mainholder {
border: 2px solid gray;
width: 70%; height: 150px;
}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<h1>Hello World!</h1>
<iframe id="mainholder" src="?getmain">
#document
<!DOCTYPE html>
<html style="cursor: auto ! important;"><head></head><frameset rows="40%,60%">
<frameset cols="50%,50%">
<frame src="?gettl" name="tl">
#document
<!DOCTYPE html>
<html style="cursor: auto ! important;">
<head></head>
<body>
<h2>TL <button type="button" id="thisbtn">This!</button> </h2>
</body>
</html>
</html>
</frame>
<frame src="?gettr" name="tr">
#document
<!DOCTYPE html>
<html style="cursor: auto ! important;">
<head></head>
<body>
<h3>TR</h3>
</body>
</html>
</html>
</frame>
</frameset>
<frame src="?getbot" name="bottom">
#document
<!DOCTYPE html>
<html style="cursor: auto ! important;">
<head></head>
<body>
<h4>BTM</h4>
</body>
</html>
</html>
</frame>
</frameset>
</html>
</html>
</iframe>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment