Sorry, but IE is going to "complain" about anything that tries to close a
window. This is a security measure that keeps rogue sites from closing "real"
windows and opening "conterfeit" windows in their place.
As to printing, try <input type="button" value="Print"
onclick="window.print()">
However, in both cases you're duplicating functions that appear in the
browser's toolbar anyway. Are you sure you need this?
Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------Â*-----------------------
|\----------------------------Â*-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------Â*-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------Â*-----------------------
*-----------------------------Â*-----------------------
"David Broughton" wrote:
> Hi - I am a very occasional Front Page 2002 user.
>
> I am trying to add a page to my JavaScript-free website that will have a
> table of information (no problem there) and two buttons - one that says
> close and will close the window, and one that says print and will print out
> the contents of the window. The page is opened in a new window using the
> "_blank" target frame hyperlink option.
>
> A search of this newsgroup and other sources found many examples that use
> JavaScript to close a window - i.e.:
> <input type="button" value="Close Order Form" onclick="window.opener = self;
> window.close()"> name="Close">, but this causes IE6 to complain about
> active content and stops the button from working unless the user
> specifically overrides the warning message. That is a pretty ugly solution.
>
> Is there a solution that doesn't rely on Javascript?
>
> How do I enable a print button ?
>
> Thanks for any help -
>
> Dave Broughton
>
>
>