Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to print a pop-up window

Status
Not open for further replies.

xanalyth

Technical User
Jan 2, 2007
2
US
I have a pop-up window that opens from a mouse over link. The pop-up window has a Print button on it. When I click the button the print dialog does not come up. If I put my mouse back over the link the print dialog box will then launch. Please help. Here is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns=" >
<head>
<title>Untitled Page</title>
</head>
<body>

<script>

function open_new_window1()
{

var new_window = open("","hoverwindow","width=400,height=200,left=500,top=300");

// open new document
new_window.document.open();


if (window.focus)
{
new_window.focus()
}

new_window.document.write("<html><title>JFS</title>");
new_window.document.write("<body bgcolor=\"#FFFFFF\">");
new_window.document.write("This is WINDOW #1 ");

new_window.document.write('<form>');
new_window.document.write('<input type=\"button\" value=\"Print this page\" onClick=\"print()\"/>');
new_window.document.write('</form>');

new_window.document.write('</body>');
new_window.document.write('</html>');


}





</script>

<br />


<a href="#" onMouseOver="open_new_window1()">Open Hover Window 1</a>
<br />

</body>
</html>


THANKS! xanalyth@hotmail.com
 
Nevermind. I found the fix.

Thanks.

xanalyth@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top