Hey Dan,
The script I sent you was to put an icon on a printer-friendly page for some
one to print. On that link, you can add the self.close function and close
the browser window at the same time the print window opens up.
So, the link in the script would look like this:
document.write('<IMG onclick="window.print();self.close();return false"
SRC="images/icon_print.gif" BORDER=0>')
Rick Sanders
902-401-7689
www.webenergy-sw.com
-----Original Message-----
From: Dan Stein [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 23, 2006 1:07 PM
To: [email protected]
Subject: RE: Witango-Talk: Print window then close
Rick,
Right now my web developer is using this
</script>
<script name="Used by PD_openSplashWindow" language="javascript">
var splashWin, autoCloseTimeoutHandle, ontopIntervalHandle;
</script>
Can't I set the autoCloseTimeoutHandle to something so it would close after
they print
The print part looks like this
<td colspan="2" bgcolor="#ECECEC"
onclick="MM_openBrWindow('printorder.tml','printorder','toolbar=yes,menubar=
yes,scrollbars=yes,width=650,height=600')">Please print this page for your
records. <img src="images/printer.gif" width="20" height="20"
align="absmiddle" /> Printer friendly version</td>
The other issue with how she did this is that here code does not form as a
link so mouse does not change to pointer.
Is there a way to do what you suggested with this same code of hers?
-----Original Message-----
From: Rick Sanders [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 23, 2006 10:19 AM
To: [email protected]
Subject: RE: Witango-Talk: Print window then close
Dan,
I would add a self.close event on the Print hyperlink:
<a href="javascript:void(0)" onClick="self.close();return false">Click Here
to print</a>
Script for printing:
(Goes where you want the print link to be).
<SCRIPT LANGUAGE="JavaScript">
<!--
if (Navigateur == "Microsoft Internet Explorer" && laVersion == 1) {
document.write('<IMG onclick="window.print()"
SRC="images/icon_print.gif" BORDER=0>');
} else {
document.write('')
}
//-->
</SCRIPT>
(Goes in the <HEAD></HEAD> tags):
<SCRIPT LANGUAGE="JavaScript">
<!--
Navigateur = navigator.appName ;
if (navigator.userAgent.indexOf("MSIE 5") != -1 ||
navigator.userAgent.indexOf("MSIE 6") != -1) {
laVersion = 1
} else {
laVersion = 0
}
//-->
</SCRIPT>
Rick Sanders
President
902-401-7689
www.webenergy-sw.com
-----Original Message-----
From: Dan Stein [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 23, 2006 10:55 AM
To: [email protected]
Subject: Witango-Talk: Print window then close
Trying to find a JavaScript that will close the window after you print.
What we are doing is printing a printer friendly version of the order
confirmation.
It would be great if it could just do that behind the scenes so when the
user clicked on the print command it just printed not the page they were
looking at but the tml file that is printer friendly.
Short of that it would be fine to just have it open a new window with the
printer friendly version and when they clicked on print there is would just
print the form and close the window.
--
Dan Stein
FileMaker 7 Certified Developer
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Cell: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000, MySQL, CWP
[EMAIL PROTECTED]
www.dss-db.com
"The love of one's country is a splendid thing. But why should love stop at
the border? "
Pablo Casals
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf