| 
 Posted by Toby Inkster on 01/09/07 09:26 
Tom wrote: 
 
> document.write("<body bgcolor=\"44eedd\">"); 
> document.write("<body text=\"000000\">"); 
> document.write("<B><font size=3 face='arial'>") 
 
What in the name of sweet Jesus is that?! 
 
You're trying to output not one but two *extra* BODY elements. An HTML 
document must contain precisely *one* BODY element. The FONT element is 
deprecated too, though that's the least of your worries. 
 
Better: 
 
<script type="text/javascript"> 
var ok   = "This chip will work"; 
var nook = "This chip will not work"; 
 
function check_input() 
{ 
	var entry = document.forms.f.textfield.value; 
	window.alert(empty.match(/\d{15}/) ? ok : nook); 
} 
</script> 
 
--  
Toby A Inkster BSc (Hons) ARCS 
Contact Me  ~ http://tobyinkster.co.uk/contact
 
[Back to original message] 
 |