This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > Java error in XP but not W2k.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Java error in XP but not W2k.
ghanna

2004-08-07, 7:15 pm

Hello,
I use a link to open a pop up window. On load the window opens the print
option then after it prints the window closes. It works fine in Windows 2K but
on our XP machines the pop-up opens and closes without ever opening the print
window. Here's the line of code:

<body onLoad="Javascript:window.print(); setTimeout(window.close, 100);">

Any Clue?????

Thanks,
Gary

Murray *TMM*

2004-08-08, 12:14 pm

Don't do it.

It'll fail on IE5x/Mac....

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"ghanna" <webforumsuser@macromedia.com> wrote in message
news:cf36na$ehh$1@forums.macromedia.com...
> Hello,
> I use a link to open a pop up window. On load the window opens the print
> option then after it prints the window closes. It works fine in Windows

2K but
> on our XP machines the pop-up opens and closes without ever opening the

print
> window. Here's the line of code:
>
> <body onLoad="java script:window.print(); setTimeout(window.close, 100);">
>
> Any Clue?????
>
> Thanks,
> Gary
>



Mick White

2004-08-08, 12:14 pm

<body onload="if(window.print){window.print();
setTimeout('window.close()', 100)} else {alert('Select \"PRINT\" from
your file menu')};">

Note single quotes and function operator "()" in setTimeout arguments.
I would set time out a little higher, too. 1e5 (10 seconds) perhaps?
setTimeout('window.close()', 1e5)
Mick.

ghanna wrote:

> Hello,
> I use a link to open a pop up window. On load the window opens the print
> option then after it prints the window closes. It works fine in Windows 2K but
> on our XP machines the pop-up opens and closes without ever opening the print
> window. Here's the line of code:
>
> <body onLoad="java script:window.print(); setTimeout(window.close, 100);">
>
> Any Clue?????
>
> Thanks,
> Gary
>

ghanna

2004-08-08, 7:14 pm

The site is a private intranet site and all users run IE 6. No Netscape, Ie5 or Mac users.

Gary
Mick White

2004-08-09, 12:15 pm

Did you try my suggestion?
Mick

ghanna wrote:

> The site is a private intranet site and all users run IE 6. No Netscape, Ie5 or Mac users.
>
> Gary

ghanna

2004-08-17, 12:15 pm

Thanks that worked!

Gary
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews