Blank Screen on Close

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Blank Screen on Close

Post by GregP »

We use a HTML splash screen on some of our PCs to launch applications like Word and Excel. On the splash screen there is a button 'Close Session', which trys to close the browser. On pressing the button PWBs close dialog kicks in asking the customer if they have really finished.

This is all how we designed it, except for one small error. When the close dialog opens, the html splash screen in the background goes blank (white) and does not reload if the user opts not to close the session. Our only option then is to use ALT+F4 to close (via the dialog) and log back in. :(

I have tried running the javascript from the HREF and onClick (with and without a HREF present) parameters and there is no change in this behaviour.

I am guessing that PWB is unloading the page before displaying the dialog, is this the case? and is there a way to change that Scott?


Thanks,
GregP

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Can you either send a copy of the page with the close button, and the confirm close dialog file, or post it on the web.

Are you using the PWB Dynamic Java Commands to close PWB, or are you using the JavaScript window close functionality?

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Javascript,

I'll email the files to you.

GregP

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

The problem is with the following line in the Shutdown JavaScript function on the page.

function Shutdown()
...
top.opener = null;
...

This line causes PWB to display a null page. But when you remove this line from the page, the underlying IE wants to make sure the page is ok to close the browser. To get around this, use the PWB Dynamic External Java command JavaExit, to close the browser.

Se the following in the PWB INI file.

[Java]
...
JavaExit=PWBExit
...

Change the JavaScript function in the web page to the following.

function Shutdown()
...
window.external.PWBExit();
...

This will allow PWB to close itself without prompting from IE, and not display the empty web page.

By the way, you come up with some of the most innovative, and nicest looking ways to use PWB, it never ceases to amaze me. Would you mind if I shared the files on our site?

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

I've got no problems with that. :)

and thanks for the response.

GregP

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

If anyone is interested, here are the pages used.

http://www.teamsoftwaresolutions.com/source/close.zip

--Scott

Post Reply