Tried the code, but did not print. So what I did was start from scratch
with what I thought would work right, but it still double prompts me,
once when the window is first open and then a second time after hitting
"OK" in the browser print window (if using Netscape). I will keep
trying. Oh, you were right, the first alert message to print does not do
anything as you suspected.

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
        if (confirm("Print it?"))
                print()
        else
                self.close()    
//-->
</SCRIPT>

Anthony Geoghegan wrote:
> 
> |I can't remember who I talked with before, but I got assistance on
> |launching a new window with my data and prompting the user whether they
> |wanted to print the screen. What I am using works, but it
> |double prompts
> |me for printing and I am not sure why. Here is my code.
> |
> |<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
> |<!--
> |       var doit = confirm("Send summary data to a new screen
> |to print?")
> |       if (doit) {
> |               print()
> |       } else {
> |               self.close()
> |    }
> |//-->
> |</SCRIPT>
> 
> Hi James
> 
> You have called doit twice.
> I bet the first doit makes no differnce as to whether it prints or not.
> do something like this:
> 
> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
> <!--
> function doit
>         {
>         return confirm("Send summary data to a new screen to print?");
>         }
> if (doit)
>         print()
> else
>         self.close()
> 
> //-->
> </SCRIPT>
> 
> This was quick and I didn't get to test it.
> 
> Regards,
> Anthony Geoghegan
> Lead Developer
> Ireland Film and Television Net
> 26 South Frederick Street
> Dublin 2
> Ireland
> Tel: +353 1 671 3664
> Fax: +353 1 671 0763
> Web: www.iftn.ie www.wow.ie
> mailto:[EMAIL PROTECTED]
> 
> NOTICE:
> This communication is confidential.  The copyright in this communication
> belongs to Ireland Film & Television Net (IFTN) or a third party.
> 
> If you are not the intended recipient of this communication please delete
> and destroy all copies and telephone IFTN on +353 1 671 3664 immediately.
> If you are the intended recipient of this communication you should not copy,
> disclose or distribute this communication without the authority of IFTN.
> 
> Any views expressed in this communication are those of the individual sender
> except where the sender specifically states those are of view of IFTN.
> 
> Except as required by law IFTN does not represent, warrant, and/guarantee
> that the integrity of this communication has been maintained or that the
> communication is free of virus, interception or interference.
> 
> ------------------------------------------------------------------------------
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to