I currently have the following code which doesn't report any errors nor does it print succesfully.
<script language="JavaScript">
var myText=12345;
var myWindow = window.open('','windowName','width=400,height=400');
myWindow.document.write(myText);
</script>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<form>
<input type="button" value="Print contents of popup" onclick="(window.print){windowName.print();}">
</form>
</body>
</html>
Can anyone find my error?
<script language="JavaScript">
var myText=12345;
var myWindow = window.open('','windowName','width=400,height=400');
myWindow.document.write(myText);
</script>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<form>
<input type="button" value="Print contents of popup" onclick="(window.print){windowName.print();}">
</form>
</body>
</html>
Can anyone find my error?