<!doctype html>
<html>
<head>
<title>Do It Yourself HTML Editor - RJM Programming - January, 2017</title>
<style>
input[type="submit"]:hover { background-color: green; }
</style>
<script type='text/javascript' src='../../../../cookie_get.js'></script>
<script type='text/javascript'>
var defh="<!doctype html><html><head><title>My HTML and Javascript and CSS" + String.fromCharCode(10) + "</" + "title>" + String.fromCharCode(10) + "<style>" + String.fromCharCode(10) + "</" + "style>" + String.fromCharCode(10) + "<" + "!-" + "- " + "scr" + "ipt type='text/javascript'> alert('Hello World from RJM Programming Dynamic HTML Editor'); " + String.fromCharCode(10) + "</" + "scrip" + "t -" + "-" + ">" + String.fromCharCode(10) + "</" + "head><bo" + "dy>" + String.fromCharCode(10) + "</" + "body>" + String.fromCharCode(10) + "</" + "html>";
var htmlcontent=(location.search.split('htmlcontent=')[1] ? ourdecodeURIComponent(location.search.split('htmlcontent=')[1].split('&')[0]) : defh);
var wois=null;
function ourdecodeURIComponent(inf) {
return decodeURIComponent(inf).replace(/\+/g,' ');
}
function ourcontains(ourarr,ourwhat) {
var retval=false;
for (var i=0; i<ourarr.length; i++) {
if (ourarr[i] == ourwhat) return true;
}
return retval;
}
function seeifokay() {
}
function loadgame() {
document.getElementById('myform').action=document.URL.split('?')[0].split('#')[0];
if (htmlcontent != defh) {
//wois=window.open('','_blank','top=50,left=50,width=400,height=400');
//wois.document.write(htmlcontent);
var x = document.getElementById("ihtmlcontent");
var y = (x.contentWindow || x.contentDocument);
if (y.document)y = y.document;
y.head.innerHTML = htmlcontent.replace("/head","head").split("<head>")[1];
y.body.innerHTML = htmlcontent.replace("/body","body").split("<body>")[1];
//x.contentWindow.location.reload(true);
}
document.getElementById('htmlcontent').value=htmlcontent;
document.getElementById('htmlcontent').innerHTML=htmlcontent;
//document.getElementById('dhtmlcontent').innerHTML=htmlcontent;
}
</script>
</head>
<body onload=" loadgame(); " style='background-color:yellow;'>
<div id=dcookies_okay><input type=hidden id=cookies_okay value=''></input></div>
<table style='width:100%;background-color:orange;' border=8><tbody><tr><td><h1>Try Your Own HTML</h1>
<h3>RJM Programming - January, 2017</h3>
<table style='height:500px;'><tbody><tr><td>
<form id='myform' action='./do_away_with_the_boring_bits.html' method='GET'>
HTML: <textarea cols=80 rows=17 type=text name=htmlcontent id=htmlcontent value=""></textarea><br>
<input type=hidden name=b2 value=></input>
<input type=submit id=manage value='Try your HTML and Javascript and CSS Above'></input><br><br><br>
</form>
</td><td style='height:100%;'>
<div id=dhtmlcontent style='height:100%;'><iframe src='about:blank' id='ihtmlcontent' style='height:400px; background-color:lightblue;'></iframe></div>
</td></tr></tbody></table>
</body>
</html>