Page 1 of 1

PB 5.41LTS Web Gadget Issues

Posted: Sun Jan 24, 2016 11:03 pm
by IdeasVacuum
PB 5.41LTS Windows 7 x86 IE 11.0.9600.18097

1) If I use the WebGadget to display Google Maps, the Google page pops-up a message:
It looks like you have enabled Internet Explorer Compatibility View. Google Maps will not work correctly unless this is turned off.
This, however, is not true, Compatibility View is not set, and if I use IE stand-alone, the message is not displayed, so it would seem the WebGadget itself triggers this somehow.

2) The WebGadget has issues with some JavaScript and pops-up error messages, e.g: http://www.theaa.com/
An error has occurred in the script on this page.
Line: 1
Char: 29674
Error: Permission denied
Code: 0
URL: http://www.theaa.com/resources/js/homep ... ary.min.js
....yet I do not get any such errors in IE (or FireFox)

Has anybody seen similar issues?

Re: PB 5.41LTS Web Gadget Issues

Posted: Mon Jan 25, 2016 6:39 am
by RASHAD
Works like a charm
PB 5.41 x86 Win 10 x64

Code: Select all

  If OpenWindow(0, 0, 0, 1920, 1200, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    WebGadget(0, 10, 10, 1900, 1180, "http://www.theaa.com/resources/js/homepage")
    myBrowser.IWebBrowser2 = GetWindowLongPtr_(GadgetID(0), #GWL_USERDATA)
    myBrowser\put_Silent(#True)
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

Re: PB 5.41LTS Web Gadget Issues

Posted: Tue Jan 26, 2016 2:37 am
by IdeasVacuum
Hi Rashad

Not like the Win8.1 charms fortunately :mrgreen:

....still a problem though. When the WebGadget has an issue with JavaScript, your code suppresses the error message pop-ups, which is great, but the display/functionality of the website is not 100% correct without the JavaScript working properly.

....Google Maps does fail to display properly, so it seems that the WebGadget triggers IE Compatibility View.

Could a Moderator move this to the Bugs section please?

Re: PB 5.41LTS Web Gadget Issues

Posted: Tue Jan 26, 2016 12:07 pm
by Bisonte
Is the webgadget really use IE 11.0.9600.18097 ?

If you don't change something in the registry, it will use another version...
Check it with http://www.whatismybrowser.com/

I think it's the "Internet Explorer 7 Compatibility View, 32 bit compatibility layer, Media Center PC v6.0"...

More at german forum

Re: PB 5.41LTS Web Gadget Issues

Posted: Wed Jan 27, 2016 12:20 am
by IdeasVacuum
That's interesting Bisonte
www.whatismybrowser.com reports:
Internet Explorer 11 on Windows 7
Internet Explorer 7 Compatibility View
Your web browser's user agent:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; GWX:RESERVED)
I'm totally confused though. I thought PB was using WebKit for all platforms and I had assumed that WebKit was itself independent of the standalone browsers.

Fact remains that the javascript and IE Compatibility View issues arrive with the PB WebGadget and are not there when I.E, FireFox or Opera are used.

Re: PB 5.41LTS Web Gadget Issues

Posted: Wed Jan 27, 2016 1:54 am
by JHPJHP
Hi IdeasVacuum,

Try the following:

Code: Select all

lpValueName.s = GetFilePart(ProgramFilename()) : lpData = 11001

If RegCreateKeyEx_(#HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", 0, #Null, #REG_OPTION_VOLATILE, #KEY_ALL_ACCESS, #Null, @phkResult, @lpdwDisposition) = #ERROR_SUCCESS
  RegSetValueEx_(phkResult, lpValueName, 0, #REG_DWORD, @lpData, SizeOf(LONG))
  RegCloseKey_(phkResult)

  If OpenWindow(0, 0, 0, 1920, 1200, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    WebGadget(0, 10, 10, 1900, 1180, "http://www.theaa.com/resources/js/homepage")
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

  If RegOpenKeyEx_(#HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", 0, #KEY_SET_VALUE, @phkResult) = #ERROR_SUCCESS
    RegDeleteValue_(phkResult, lpValueName)
    RegCloseKey_(phkResult)
  EndIf
EndIf
Additional setting:

Code: Select all

SetGadgetAttribute(0, #PB_Web_BlockPopupMenu, #True)
SetGadgetAttribute(0, #PB_Web_BlockPopups, #True)
WebBrowser2.IWebBrowser2 = GetWindowLongPtr_(GadgetID(0), #GWL_USERDATA)
WebBrowser2\put_Silent(#True)

Re: PB 5.41LTS Web Gadget Issues

Posted: Wed Jan 27, 2016 10:20 am
by IdeasVacuum
Hi JHPJHP

The Registry edit does fix the Goggle Maps issue, but doesn't the app User have to be Administrator?
Concerning the script error suppression, that is not a solution, it just removes the symptoms! :D

I'm thinking about launching (RunProgram) the default browser instead, or a mini browser such as midori
What can be done is limited compared to the embedded WebGadget, but at least it is reliable.

Re: PB 5.41LTS Web Gadget Issues

Posted: Wed Jan 27, 2016 11:16 am
by Dude
IdeasVacuum wrote:The Registry edit does fix the Goggle Maps issue, but doesn't the app User have to be Administrator?
No, writing to #HKEY_CURRENT_USER can be done with limited rights (any logged-in user).