p2bc
09-09-2003, 05:06 AM
This is my script:
<head>
<script type="text/javascript">
function printpage()
{
window.print()
}
</script>
<script type="text/javascript">
function WinClose()
{
window.close()
}
</script>
</head>
Now how do you call it so that it will work on a mac???
I have done:
<a href="map.html" onclick="WinClose()">close</a>
<a href="map.html" onclick="WinClose(this)">close</a>
<a href="url" onclick="WinClose()">close</a>
<a href="map.html" onclick="WinClose(this.href)">close</a>
...and a few i can't remember. All of which worked on a PC, but for the life on me, not on a MAC.
And while you are at it, can you tell me how to print for a MAC as well. Tried most of the same codes above for printing, and the worked. But none of them worked on a Mac.
As a second note I also have this link: (the kicker if you will)
<a>href="http://www.krak.dk/scripts/kort/krakdk_kortvisning.asp?FORENING=&virk=&KNR=3003096&KK=825445974
&ikonklik=kort_ikon_info" target="_blank" onclick="WinClose(this)">www.krak.dk</a>
This link opens the link a new brouser window, and closes the popup window. The close command is the same, but this time it works on a MAC. It open the new window, and closes the popup. Explain that one, for 5 extra bonus points.
<head>
<script type="text/javascript">
function printpage()
{
window.print()
}
</script>
<script type="text/javascript">
function WinClose()
{
window.close()
}
</script>
</head>
Now how do you call it so that it will work on a mac???
I have done:
<a href="map.html" onclick="WinClose()">close</a>
<a href="map.html" onclick="WinClose(this)">close</a>
<a href="url" onclick="WinClose()">close</a>
<a href="map.html" onclick="WinClose(this.href)">close</a>
...and a few i can't remember. All of which worked on a PC, but for the life on me, not on a MAC.
And while you are at it, can you tell me how to print for a MAC as well. Tried most of the same codes above for printing, and the worked. But none of them worked on a Mac.
As a second note I also have this link: (the kicker if you will)
<a>href="http://www.krak.dk/scripts/kort/krakdk_kortvisning.asp?FORENING=&virk=&KNR=3003096&KK=825445974
&ikonklik=kort_ikon_info" target="_blank" onclick="WinClose(this)">www.krak.dk</a>
This link opens the link a new brouser window, and closes the popup window. The close command is the same, but this time it works on a MAC. It open the new window, and closes the popup. Explain that one, for 5 extra bonus points.