I'm having trouble getting my code to correctly display HTML within the JavaScript code I have. Basically, I am checking for the variable hundo to equal 3, and then have the script display a form. I have tested the code to just show an alert message when hundo equals 3, but when I use document.write it fails to work.
<script>
setInterval(function(){
if(hundo == '3'){
document.open();
document.write("<form action="insert.php" method="post">
Link URL: <input type="text" name="linkurl" />
<input type="submit" />
</form>");
document.close();
}
}, 1000);
</script>