<?php
// draganddrop_hotwiring.php
// August, 2023
// RJM Programming

if (isset($_GET['html'])) {
  echo str_replace('+', ' ',urldecode($_GET['html']));
} else if (isset($_POST['html'])) {
  echo str_replace('+', ' ',urldecode($_POST['html']));
} else {

   echo "<html>
   <head>
   <title>Drag and Drop Hotwiring External Javascript - RJM Programming - August, 2023</title>
   </head>
   <body>
   <h1>Drag and Drop Hotwiring External Javascript</h1>
   <h3>RJM Programming - August, 2023<h3><br>
   <p>HTML Template you can edit and download below, later ...</p>
   <form method=POST action='./draganddrop_hotwiring.php'>
   <textarea rows=26 cols=150 id=html name=html style=background-color:yellow;>
<html>
<head>
<script type=text/javascript>
  function doit(what) {
    eval(what);
  }
</script>
</head>
<body>
<h1>My Drag and Drop Hotwiring External Javascript Webpage</h1>
&lt;textarea style=background-color:silver; ontouchdown='event.stopPropagation();' onmousedown='event.stopPropagation();' onclick=doit(this.value); data-onblur=doit(this.value); rows=5 cols=80 placeholder='Please place your drop action to do Javascript here below ...' id=textareaaction&gt;
  alert('You just dropped off');   
&lt;/textarea&gt;
<h4 class=parentdrop background-color:orange;>Drop Zone</h4>
<iframe scrolling=no frameborder=0 name=iftr id=iftr style=display:block; srcdoc=\"<body style=background-color:transparent;><p id=mg title='Drag and drop Javascript in textarea above.' draggable='true'>&#128205;</p><br><br><div id=myh1></div><script type='text/javascript' src='//www.rjmprogramming.com.au/HTMLCSS/countries.js?rand=896457' defer></script></body>\" data-src=></iframe>
</body>
</html>   
   </textarea><br><br>
   <input type=submit id=mysub value=Display style=background-color:lightgreen;></input>
   </form>
   </body>
   </html>";

}

exit;

?>
