I am very new..., Printing a page |
I am very new..., Printing a page |
ethomas |
Apr 10 2008, 01:38 PM
Post
#1
|
Group: Members Posts: 2 Joined: 10-April 08 Member No.: 5,398 |
Feel kind of silly, but I am just beginning. I need to know how to call for a certain document (a word document, instead of a movie (swf)), have it open up in a separate window and print. After printing the exit code to close the new window. It needs to fit somewhere in this code. I received this code from a co-worker who is no longer employed by my company, and so I can't ask her. I am trying to get a project done without the knowledge of how to do this.
<html> <head> <title></title> <meta http-equiv="refresh" content="180; URL=pl_33.htm" /> <style type="text/css"> <!-- #next {position: absolute; left: 568px; top: 480px; height: 37px; width: 112px; z-index: 3;} #prev {position: absolute; left: 432px; top: 480px; height: 37px; width: 112px; z-index: 3;} #exit {position: absolute; left: 40px; top: 480px; height: 37px; width: 112px; z-index: 3;} #restart {position: absolute; left: 150px; top: 480px; height: 40px; width: 120px; z-index: 3;} #replay {position: absolute; left: 260px; top: 480px; height: 40px width: 120px; z-index: 3;} #nav {position: absolute; left: 0px; top: 465px; height: 60px width: 499px; cellspacing: 0; z-index: 1;} .help {cursor: url(myPointer.gif);} --> </style> <script language="JavaScript"> <!-- function SymError() { return true; } window.onerror = SymError; var SymRealWinOpen = window.open; function SymWinOpen(url, name, attributes) { return (new Object()); } window.open = SymWinOpen; //--> </script> <script language="Javascript" type="text/javascript"> <!-- Hide script function closeWindow() { top.close(); } //--> </script> <script src="ehazardnav_33.js" type="text/javascript"></script> </head> <body background="#000000" height="100%" width="100%"> <div style='position: absolute; left: 120px; top: 20px;'> <A class= "help" HREF="ehazard_Index.htm"><img src="invisiblebutton.gif" width='40' height='40' frameborder="0" border="0"></a> </div> <br><br> <div style='position: absolute; left: 150px; top: 10px;'> <script type="text/javascript">RunFoo();</script> <div id="nav"><img src="navb script:closeWindow()" OnMouseOver="exit.src='exit_u.gif'" OnMouseOut="exit.src='exit.gif'"> <img name="exit"img src="exit.gif" frameborder="0" border="0"></a></div> <div id="restart"><A HREF="ehazard_1.htm" OnMouseOver="restart.src='restart_u.gif'" OnMouseOut="restart.src='restart.gif'"> <img name="restart"img src="restart.gif" frameborder="0" border="0"></a></div> <div id="replay"><A HREF="ehazard_33.htm" OnMouseOver="replay.src='replay_u.gif'" OnMouseOut="replay.src='replay.gif'"> <img name="replay"img src="replay.gif" frameborder="0" border="0"></a></div> </div></body></html> <script language="JavaScript"> <!-- var SymRealOnLoad; var SymRealOnUnload; function SymOnUnload() { window.open = SymWinOpen; if(SymRealOnUnload != null) SymRealOnUnload(); } function SymOnLoad() { if(SymRealOnLoad != null) SymRealOnLoad(); window.open = SymRealWinOpen; SymRealOnUnload = window.onunload; window.onunload = SymOnUnload; } SymRealOnLoad = window.onload; window.onload = SymOnLoad; //--> </script> My .js file reads like this... function RunFoo() { document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="720" height="470" id="PL" align="middle">\n'); document.write('<param name="allowScriptAccess" value="sameDomain" />\n') document.write('<param name="movie" value="PL.swf" /><param name="loop" value="false" />\n'); document.write('<param name="menu" value="false" /><param name="quality" value="high" />\n'); document.write('<param name="bgcolor" value="#ffffff" />\n'); document.write('<embed src="PL.swf" loop="false" menu="false" quality="high" bgcolor="#ffffff" width="600" height="375" name="PL" align="left" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" />\n'); document.write('</object>\n'); } |
Darin McGrew |
Apr 10 2008, 01:42 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
I have moved this to the client-side scripting forum, since it's a question about JavaScript.
QUOTE I am trying to get a project done without the knowledge of how to do this. Please see the FAQ entry Where can I learn about JavaScript (LiveScript, JScript, ECMAScript, DOM)? |
Lo-Fi Version | Time is now: 26th April 2024 - 11:32 AM |