Guest_imported
New member
- Jan 1, 1970
- 0
hi,
i have following code:
------------------------------------------------------------<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function f1()
{
document.writeln("<html>"
document.writeln("<body>"
document.writeln("<h1>Page to be printed</h1>"
document.writeln('<form name="frm1"><input type="button" name="btn2" onClick="window.print();"></form>');
document.writeln('</body>');
document.writeln('</html>');
}
//-->
</SCRIPT>
</head>
<body>
<h1> Click on the button</h1>
<form name="frm1">
<input type="button" name="btn1" onClick="f1();">
</form>
</body>
</html>
------------------------------------------------------------My intension is to print the dynamically generated page (having the message 'Page to be printed') when button 'btn2' is clicked but i am getting the printed page containing the message 'Click on the button'
please help me,
regards,
Nishant
i have following code:
------------------------------------------------------------<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function f1()
{
document.writeln("<html>"
document.writeln("<body>"
document.writeln("<h1>Page to be printed</h1>"
document.writeln('<form name="frm1"><input type="button" name="btn2" onClick="window.print();"></form>');
document.writeln('</body>');
document.writeln('</html>');
}
//-->
</SCRIPT>
</head>
<body>
<h1> Click on the button</h1>
<form name="frm1">
<input type="button" name="btn1" onClick="f1();">
</form>
</body>
</html>
------------------------------------------------------------My intension is to print the dynamically generated page (having the message 'Page to be printed') when button 'btn2' is clicked but i am getting the printed page containing the message 'Click on the button'
please help me,
regards,
Nishant