eCat
10-06-2005, 01:21 PM
I've searched through about 200 relevant posts and haven't found what I was looking for, so I hope I'm not asking for something already solved!
I have a simple webpage which contains an image, a button to print the page and a button to close the window.
Here is my code to print & close (inside a form):
<input type=button name=print value="print this invitation" onClick="javascript:window.print()">
<input type=button value="close this window" onClick="javascript:window.close();">
My questions to the forum are:
1) can I use js to just print the image itself and not the whole page with the image and the two buttons on it?
2) is there a way to have js close the window without the "the web page you are viewing is trying to close..." alert box that pops up in IE?
Thanks!
eCat
I have a simple webpage which contains an image, a button to print the page and a button to close the window.
Here is my code to print & close (inside a form):
<input type=button name=print value="print this invitation" onClick="javascript:window.print()">
<input type=button value="close this window" onClick="javascript:window.close();">
My questions to the forum are:
1) can I use js to just print the image itself and not the whole page with the image and the two buttons on it?
2) is there a way to have js close the window without the "the web page you are viewing is trying to close..." alert box that pops up in IE?
Thanks!
eCat