Close PWB on event or mouse action

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
RobMain
Observer
Observer
Posts: 5
Joined: Mon Nov 17, 2003 9:42 am

Close PWB on event or mouse action

Post by RobMain »

I am new to this product and was wondering if PWB can be closed after a web event (cookie receipt, redirection to a particular page, clicking on a link, etc..). We want to use PWB in kiosk mode as a front-end to an authenticator. Once authentication occurs, we want to be able to close PWB and reveal the desktop. Our OS is Win2K patched current as of 14-Nov-03. Here's our INI file:


[Browser]
RegisteredTo=Unregistered
RegistrationNumber=
IniFileVersion=2.04
Title=College Libraries
KioskMode=True
Desktopmode=False
HomePage=www.lib.college.edu
server=www.lib.college.edu
CommandLineHomePage=False
SearchPage=www.google.com
WebMailPage=
AddressBarText=Address:
StartMaximized=True
DefaultFontSize=2
WindowHeight=
WindowWidth=
WindowTop=
WindowLeft=
ShowMenuBar=False
ShowToolBar=False
ShowShellBar=False
ShowAddressBar=False
ShowAnimation=False
ShowStatusBar=False
ShowBackButtonMenu=False
ShowInactivityTimer=True
ShowActivityTimer=True
ShowStatusBarTime=True
ShowURLInBrowserCaption=True
ShowPrintButtonDialog=False
ForcePrintPreview=False
DisableMenuBarMove=True
DisableToolBarMove=True
DisableShellBarMove=False
DisableAddressBarMove=True
DisableMinimizeButton=False
DisableMaximizeButton=False
DisableCloseButton=False
DisableMoveWindow=False
DisableNewWindow=False
DisableScriptErrorSuppression=False
DisableINIVersionCheck=False
DisableExit=True
ConfirmClose=True

[SecondWindow]
AlwaysOnTop=False
LimitCount=0
DisableMinimizeButton=False
DisableMaximizeButton=False
DisableUnrequested=True

[Dialogs]
DialogSeconds=10
PolicyTitle=Policy
AccessTitle=Warning: Denied
ConfirmCloseDefaultNo=True
ConfirmCloseTitle=Confirm Close
PolicyHeight=
PolicyWidth=
ConfirmCloseSoundFile=
AccessDeniedSoundFile=

[Files]
WorkingAnimation=
PolicyFile=.\Policy.txt
HistoryFile=.\History.txt
CheckURLFile=.\URL.txt
CheckIPFile=.\IP.txt
PopupAdFile=.\Popup.txt
AccessMessageFile=.\Access.txt
ConfirmCloseMessageFile=.\ConfirmClose.txt
SaveAsErrorMessageFile=.\SaveAsError.txt
DownloadErrorMessageFile=.\DownloadError.txt
FavoritesFolder=.\Favorites
ShellBarFolder=.\ShellBar
StartupScript=

[Directories]
SaveAsDirectory=A:\
SaveAsErrorTitle=Floppy required
DownloadDirectory=A:\
DownloadErrorTitle=Floppy required

[Security]
StationEnviromentVariable=%COMPUTERNAME%
WriteHistoryFile=False
TrackURL=False
CheckURLAccess=False
CheckIPAccess=False
ClosePopupAds=True
ShowAccessDialog=True
LogAccess=False
ClearCacheOnHome=True
ClearCacheOnClose=True
DisableAddressDropDown=True
DisableContextMenu=True
UseCustomContextMenu=True
ShowPolicyDialog=True
OnlyAccessHTTP=False
DisableSecondInstance=True

[Overrides]
ExitBrowser=exit
Logoff=logoff
Shutdown=shutdown
ResetActvityTime=resettime

[Inactivity]
InactivityTimer=False
InactivitySeconds=1200
InactivityMessageTitle=Warning
InactivityMessageFile=.\Inactivity.txt
InactivityAction=Home
InactivitySoundFile=
InactivityStartOnOpen=False

[Activity]
ActivityTimer=False
ActivitySeconds=1200
ActivityMessageTitle=Warning
ActivityMessageFile=.\Activity.txt
ActivityWarnAt=120
ActivityWarnTitle=Warning
ActivityWarnMessageFile=.\ActivityWarn.txt
ActivityAction=Exit
ActivitySoundFile=
ActivityStartOnOpen=False

[Proxy]
UseCustom=False
ProxyEnable=
ProxyServer=
ProxyOverride=
AutoConfigURL=

[PageSetup]
UseCustom=False
Footer=&u&b&d
Header=&w&bPage &p of &P
MarginBottom=0.75000
MarginLeft=0.75000
MarginRight=0.75000
MarginTop=0.75000
Duplex=1
Orientation=1

[Buttons]
Back=True
Forward=True
Separator1=False
Stop=True
Refresh=True
Home=True
Separator2=True
Search=True
Favorites=True
Print=True
PrintPreview=True
Separator3=True
WebMail=False
Separator4=True
About=True
Policy=False
Separator5=True
New=False
Save=False
Separator6=False
Cut=False
Copy=False
Paste=False
Find=False
TextSize=True

[MenuItems]
FileMenu=True
FileNew=True
FileOpen=False
FileSaveAs=True
FileSeparator1=True
FilePageSetup=True
FilePrintPreview=True
FilePrint=True
FileSeparator2=True
FileProperties=True
FileClose=True
EditMenu=True
EditCut=True
EditCopy=True
EditPaste=True
EditSeparator1=True
EditSelectAll=True
EditSeparator2=True
EditFind=True
ViewMenu=True
ViewToolbar=True
ViewStatusBar=True
ViewSeparator1=True
ViewGoto=True
ViewGotoBack=True
ViewGotoForward=True
ViewGotoHome=True
ViewGotoSearch=True
ViewStop=True
ViewRefresh=True
ViewTextSize=True
ViewTextSizeLargest=True
ViewTextSizeLarge=True
ViewTextSizeMedium=True
ViewTextSizeSmall=True
ViewTextSizeSmallest=True
ShellMenu=False
FavoritesMenu=True
HelpMenu=True
HelpPolicy=True
HelpAbout=True

[ContextMenu]
OpenLink=True
OpenLinkNew=True
SaveTarget=True
PrintTarget=True
Separator1=True
ShowPicture=True
SavePicture=True
SetWallPaper=True
SetDeskTopItem=False
Separator2=True
Cut=True
Copy=True
CopyShortcut=True
Paste=True
Separator3=True
Encoding=True
Separator4=True
Properties=True



Any response is appreciated. Thanks!

RobMain
Observer
Observer
Posts: 5
Joined: Mon Nov 17, 2003 9:42 am

Javascript window.close(); leaves blank window

Post by RobMain »

Several of you have emailed me personally to pass along the Javascript snippet window.close(); function. Thanks for the information! This works fine with the exception that I am left with a blank window. I need for the window closure to reveal the desktop, but I am not quite getting that far.

Is PWB responding as expected by presenting a blank browser window upon the window.close(); event? Am I missing something?

Thanks again for the earlier responses.

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

Post by Scott »

You have DisableExit set to true. This will prevent the scripts from closing the browser. Set DisableExit to false and the scripts will work.

--Scott

RobMain
Observer
Observer
Posts: 5
Joined: Mon Nov 17, 2003 9:42 am

DisableExit=False trumps intent of kiosk mode

Post by RobMain »

Scott,

Setting DisableExit=False trumps the intent of entering into kiosk mode. We want to be able to use one INI file until authentication and a different one within the same browser session afterwards. I read your email and anxiously await to assist in any testing. Thanks!


-Rob

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

Post by Scott »

Here is a test copy of PWB that accepts a JavaScript command to exit.

www.teamsoftwaresolutions.com/beta/PWB2i.zip

This version of PWB will respond to the following JavaScript command, and exit.

window.external.PWBExit

See below for the sample HTML code to test this. The close button tries to close PWB can not if the disable exit is set to true. The exit button will close PWB with the disable exit set to true.

Please keep in mind this is for testing only. This functionality should become available in a future version of PWB.

--Scott

<html>
<head>
<title>Close</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function OnClickQuit() { top.opener = self; top.close(); return null; }
function OnClickExit() { window.external.PWBExit }
//-->
</script>
</head>
<body>
<form><input type='button' name='close' value='Close Window'
onClick='OnClickQuit()'></form>
<form><input type='button' name='exit' value='PWB Exit'
onClick='OnClickExit()'></form>
</body>
</html>

Post Reply