Page 1 of 1

Javascript Not Executing

Posted: Tue Jul 11, 2017 11:12 am
by phillipbrickner
I have a local webpage that has javascript to change the background and to go to links with some opacity javascript functions for visual affect of pressing the links\buttons. None of this is working. I am migrating this page to PWB v3.
My pwb.ini file

[AutoRegister]
RegisterKey=
RegisterPassword=
RegisterDaysLeft=30
RegisterSeconds=15
RegisterShowWindow=False
UseWindowsRegistry=False
RegisterDelayClose=False

[Browser]
RegisteredTo=
RegistrationNumber=
IniFileVersion=3.05
Title=
HomePage=C:\Software\pwb\kids_kiosk\kids_internet.html
StartMaximized=True
WindowHeight=
WindowWidth=
WindowTop=
WindowLeft=
DisableMinimizeButton=True
DisableMaximizeButton=True
DisableCloseButton=True
DisableMoveWindow=True
DisableResizeWindow=True
SecureMode=True
DisableExit=False
ConfirmClose=False
ExitPage=
SaveState=False
RemoveStateOnClose=True
DisableAutoComplete=True
UseIEFavorites=False
TabHomePage=
AlwaysOnBottom=False
DisableGPURendering=True
AddressBarReadOnly=False
ShowAddressBar=False
ShowStatusBar=False
ShowActivityTimer=False
ShowInactivityTimer=True
ShowStatusBarIcons=True
DefaultZoomLevel=
ShowNavigationBar=False
ShowToolbar=False
DisableNewWindow=False
DisableNewTab=True
DisableNewWindowInit=True
StartTimersOnMouseKeyboard=True
KioskMode=True
EnableTheaterMode=True
HideCursor=False
ShowTitleBar=True
DisableCtrlEnter=True
DisableTabClose=True
DisableScrollBars=False
ShowShellBar=False
ShowStatusBarTime=True
StatusBarTimeFormat=
StatusBarTimeWidth=
SecureModeDelayStart=
DisableDynamicMenus=False
DisableSingleWordSearch=False
DisableLastTabCloseWindow=True
MapOpenToAddressBar=True
CommandLineHomePage=False
ShowKioskBar=False
AlwaysOnTop=False
CheckAlwaysOnTop=False
CheckOpenIE=False
CheckOpenCEF=False
SetFocusTab=
TabWidth=
DisableShowLastTab=True
EnableLargeTabs=False

[SecondWindow]
StartMaximized=False
WindowHeight=1000
WindowWidth=1400
WindowTop=0
WindowLeft=100
DefaultZoomLevel=
MaintainZoom=False
DisableUnrequested=False
DisableShiftClick=False
OpenInParentWindow=False
AlwaysOnTop=True
DisableMinimizeButton=True
DisableMaximizeButton=True
DisableMoveWindow=True
DisableResizeWindow=True
DisableTitleBar=False
ShowNavigationBar=False
ShowAddressBar=False
ShowKioskBar=True
ShowToolBar=False
ShowStatusBar=True
ShowShellBar=False
EnableFullScreenWindow=False
NewPageAsHome=False

[ToolBars]
ShowButtontext=False
NavigationBarBreak=False
NavigationBarGripper=True
NavigationBarWidth=
ToolBarBreak=False
ToolBarGripper=True
ToolbarWidth=
AddressBarBreak=True
AddressBarGripper=True
AddressBarWidth=
ShellBarBreak=False
ShellBarGripper=True
ShellBarWidth=
AlignBottom=False
AlignLeft=False
KioskBarScrollBy=

[Printer]
ShowPrintButtonDialog=False
ForcePrintPreview=False
ShowPrintingDialog=False
PrintingMessageFile=Printing.html

[Dialogs]
DialogSeconds=10
AlwaysOnTop=True
ShowPopupMessage=True

[Files]
FavoritesFolder=Favorites
ShellbarFolder=Shellbar
KioskbarFolder=
HistoryFile=History.txt
CheckURLFile=URL.txt
CheckOnTopFile=
AccessMessageFile=Access.html
ConfirmCloseMessageFile=
PolicyFile=
PolicyDeclineScript=
StartupScript=
ShutdownScript=
PasswordFile=
PopupOnButtonFile=
PopupOffButtonFile=
NewWindowInitFile=
CheckOpenIEFile=
FilterDLL=
SaveAsErrorMessageFile=
ExecuteFilterFile=

[WebFiles]
EnableWebFiles=False
CheckURLFile=

[Directories]
SaveAsDirectory=
DownloadDirectory=

[Security]
StationEnvironmentVariable=COMPUTERNAME
UseUniqueHistoryFiles=False
WriteHistoryFile=False
TrackURL=False
CheckURLAccess=True
ShowAccessDialog=True
LogAccess=False
ClearCacheOnClose=True
DisableContextMenu=False
UseCustomContextMenu=True
OnlyAccessHTTP=False
RestartOnClose=True
DisableFileDownload=False
AllowBrowseOnDeny=False
OnlyAccessInternet=False
DebugAccessString=False
LogDeniedAccess=False
ShowPolicyDialog=False
RestrictFileDownload=False
EnableSecurityBand=False
SetPWBAsDefault=True
ShowFilterStatus=False
FilterOnText=<Filter On>
FilterOffText=<Filter Off>
ShowPasswordDialog=
Password=
RebootOnExit=False
LogOffOnExit=False
EnableAlternateOverrideKeys=False
CheckURLMainFrameOnly=False
AccessURLRedirect=
SecondInstanceNavigateCurrent=False
DisableSecondInstance=False
CheckExecuteAccess=False
FilterIgnoreEmpty=False

[Overrides]
ExitBrowser=
Logoff=
Shutdown=
DisableFilters=
ShowAddressBar=
ReReadINIFile=
OverrideURLKeyword=

[Java]
EnableExternalJava=True
JavaExit=
JavaActivity=
JavaRegister=
JavaHideToolbar=
JavaExecute=
JavaReadINIFile=
JavaPrint=
JavaHideAddressBar=
JavaOverrides=
JavaStartApp=
JavaSetActivity=
JavaGetActivity=

[Inactivity]
InactivityTimer=True
InactivitySeconds=180
InactivityMessageFile=Inactivity.html
InactivityAction=Restart
InactivityStartOnOpen=False
InactivityShowDialog=True
ResetOnMouseMove=True
ResetOnMouseButton=True
ResetOnKeyboard=True

[Activity]
ActivityTimer=False
ActivitySeconds=1200
ActivityMessageFile=
ActivityAction=Exit
ActivityWarnAt=
ActivityWarnMessageFile=
ActivityStartOnOpen=False
ActivitySecondWarnAt=
ActivitySecondWarnMessageFile=

[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
Stop=True
Refresh=True
Home=True
Favorites=True
Menu=True
New=True
NewTab=True
Popup=False
Save=False
Cut=True
Copy=True
Paste=True
Zoom=False
Find=True
Print=True
PrintPreview=True
Policy=False

[MenuItems]
AppOpenIETab=False
AppOpen=
AppPrint=True
AppPrintPreview=True
AppZoom=True
AppZoomNormal=True
AppZoomIncrease=True
AppZoomDecresase=True
AppSeparator1=True
AppProperties=True
AppSeparator2=False
AppPolicy=False

[ContextMenu]
Spelling=True
Back=True
Forward=True
Separator0=True
OpenLink=True
OpenLinkTab=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
Search=True
Separator3=True
Encoding=True
Separator4=True
Print=True
Refresh=True
Separator5=False
Properties=False

[KioskButtons]
Back=True
Forward=True
Stop=False
Refresh=False
Home=False
Print=False
ZoomIncrease=False
ZoomNormal=False
ZoomDecrease=False
ScrollUp=False
ScrollDown=False
Close=True

[MultipleHomeTabs]

[TabNamesForced]

[Addons]

[HighLight]
EnableHighLight=False
ISBNFontAttributes=COLOR=#0000ff STYLE="background-color:#ffff00"
ISBNLinkAttributes=href=http://www.amazon.com/gp/search/ref=sr_ ... isbn=%ISBN%
ISBNTitleAttributes=Search for %ISBN%

I would attach the images and html but it seems that there are restrictions on size. Thanks for any help.
I have already tried allowing the below.
+JavaScript
+About:Blank
+all

Re: Javascript Not Executing

Posted: Tue Jul 11, 2017 8:35 pm
by Scott
Are you using PWB IE or PWB CEF?

--Scott

Re: Javascript Not Executing

Posted: Tue Jul 11, 2017 9:35 pm
by phillipbrickner
Sorry about that. PWB IE

Re: Javascript Not Executing

Posted: Thu Jul 13, 2017 8:41 am
by phillipbrickner
I think I just found a bug.
When using PWV v3 CEF when a url gets blocked the pages when reopens it gets all of the [Buttons]
Even if all the buttons are set to False.
I am testing opening kids.sandiegozoo.org in a new window from a local page then clicking on the games link then on one of the games.
I have allowed kids.sandiegozoo.org.
But the games go off site so I get the url block.
When the page opens back to the page I was on I get all of the [Buttons]

It looks like it opens a new page and closes the existing page because the new pages has the title bar up top. Untitled:2 - PWB
If it is easier it would be nice to have an option that when a page gets blocked to close all pages. I don't understand why those buttons would be there.

Also is there a way to turn off the closing message when you press the close button on the kiosk bar on a second page?

Re: Javascript Not Executing

Posted: Thu Jul 13, 2017 2:35 pm
by Scott
When using PWB v3 CEF setting the following will only check the main frame of the page against the filter.

[Security]
CheckURLMainFrameOnly=True

Otherwise you have to allow all URLs for all frames on a page and may explain why you are getting some strange filter results.

The Kiosk Bar Close button sends a close app message by design, which closes the entire PWB application and not just the current PWB window. The kiosk mode is mostly intended as a single window kiosk application.

--Scott

Re: Javascript Not Executing

Posted: Thu Jul 13, 2017 7:51 pm
by phillipbrickner
Could I request a enhancement for a button that just closes that window for the kiosk bar? Or the ability to turn off the close PWB confirmation box?

Does PWB IE V3 not support Javascript?

Re: Javascript Not Executing

Posted: Fri Jul 14, 2017 2:05 pm
by Scott
I will add a close window button for the kiosk bar to our to do list.

PWB v3 IE does support JavaScript via Internet Explorer. However you have to ensure Internet Explorer is not restricting local JavaScript files which is on by default for security reasons.

https://stackoverflow.com/questions/814 ... html-pages

--Scott

Re: Javascript Not Executing

Posted: Tue Aug 01, 2017 11:58 am
by phillipbrickner
I added this to the top of the page before <html> and it worked

<!doctype html>
<!-- saved from url=(0016)http://localhost -->

Thanks for your help Scott and implementing that button in the future.