I have an HTML code that need fixing...?

  • Thread starter Thread starter The Riddle 1
  • Start date Start date
T

The Riddle 1

Guest
I have this HTML code and I need it to open in the same window not as a pop-up. I want it to display the result below, could someone edit my code, adn make it do that? Here is my code:

<html>
<head>
<title>Html Code Tester</title>
</head>
<body bgcolor="#00ffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
<center><b><u>Please enjoy this html code tester! You will be able to test your names HTML code using this HTML code tester.</b></u></center>
<script language="JavaScript">
function preview() {
temp = document.tester.box.value;
preWindow = open("",
"preWindow"," menubar=yes, scrollbars=yes");
preWindow.document.open();
preWindow.document.write(temp);
preWindow.document.close();
};
</script>
<center>
<table bgcolor="#3366CC" border="5" cellpadding="5" cellspacing="0">
<tr><td align="center" bgcolor="#660099">
<form name="tester">
<textarea rows="8" cols="45" wrap="physical" name="box">
</textarea>
<p>

<input type="button" value="Test Your Code" onClick="preview()">
<input type="reset" value="Clear Your Code">
</td></tr></table>
</form>
</center>
</body>
</html>
I NEED IT AS A PREVIEW IN A SECTION BELOW. COULD SOMEONE REWRITE MY SCRIPT TO DO THIS?
OK, CAN SOMEONE REWRITE IT SO IT WORKS, THE SECOND ANSWER LOOKS GOOD, BUT IT DOESN'T WORK! IT JUST DOES NOTHING. I NEED THE THING TO SHOW UP IN THE BOX BELOW. COULD SOMEONE REWRITE THE SCRIPT TO ACTUALLY DO THAT? PLEASE?
 
Back
Top