HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Linux)">
<META NAME="CREATED" CONTENT="0;0">
<META NAME="CHANGED" CONTENT="0;0">
<STYLE TYPE="text/css">
<!--
@page { margin: 0.79in }
P { margin-bottom: 0.08in }
PRE.cjk { font-family: "Nimbus Mono L", monospace }
-->
</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<PRE CLASS="western"><html><head></head><body onload="document.notarealform.textfield.focus()">
<script type="text/javascript">
<!--
document.write("<H>A heading</H><br /><br /><br />");
function youentered(){
var item = document.getElementById('item').value;
document.getElementById('entereditem').innerHTML = item;
document.getElementById('explanation').innerHTML = 'Your search entry: ';
}
function itemresults(){
var itemField = document.getElementById('item');
if (itemField.value == "a") {
document.getElementById("show").innerHTML = "goes with a";
} else if (itemField.value == "b") {
document.getElementById("show").innerHTML = "goes with b";
} else if (itemField.value == "") {
document.getElementById("show").innerHTML = "goes with c";
} else {
document.getElementById("show").innerHTML = "goes with d";
}
}
//-->
</script>
<table><tr><td bgcolor="f0faf5" id="show"></td></tr></table>
<p><br /><br />Enter some text.<p />
<p><i id='explanation'>Your entry: </i><b id='entereditem'>none</b></p>
<form method="post" name="notarealform">
<input type='text' name="textfield" id='item' onkeyup='youentered()' />&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<input type='button' onclick='itemresults()' value='Look It Up'/></form>
</body></html></PRE>
</BODY>
</HTML>
You're trying to publish an office document. As you can see above, all of your code is inside <pre> tags, so it's just displayed literally. You need to type all that code into a plain text editor (gedit, for example) and save the file that way.
Bookmarks