Page 1 of 1

WebGadget flag to hide error popups

Posted: Mon Jun 01, 2009 2:09 am
by PB
Currently the WebGadget supports only one single flag, but I'd like to suggest
another: #PB_Web_HideErrors. Purpose: Suppress JavaScript error messages.
Sometimes when showing content in a WebGadget, you will get this gem:

Image

So, to avoid this pop-up error message, I've been adding this code to my WebGadgets:

Code: Select all

WebGadget(#MyWebGadget,4,4,478,247,"")
  MyWebGadget.IWebBrowser2=GetWindowLong_(GadgetID(#MyWebGadget),#GWL_USERDATA)
  MyWebGadget\put_Silent(#True) ; Suppress JavaScript error messages.
It'd be nice just to do this instead, to save all that extra typing:

Code: Select all

WebGadget(#MyWebGadget,4,4,478,247,"",#PB_Web_HideErrors)
Also, I know you can suppress right-clicks with #PB_Web_BlockPopupMenu via
SetGadgetAttributes(), but it'd be nice to do it all one declaration, too:

Code: Select all

WebGadget(#MyWebGadget,4,4,478,247,"",#PB_Web_HideErrors|#PB_Web_BlockPopupMenu)

Re: WebGadget flag to hide error popups

Posted: Tue Jun 02, 2009 1:55 pm
by PB
Had a different pop-up today at work with my WebGadget, which my snippet
above in the original post doesn't prevent. See below. Anyone know how to
prevent this one from appearing? :(

Image

Posted: Tue Jun 02, 2009 6:44 pm
by Trond
Both those error messages means you have installed some kind of debugger (happens when you install Visual Studio or similar). Normal users will see a third type of error message:
Image

Just so you are warned.

Posted: Tue Jun 02, 2009 9:39 pm
by PB
So the snippet I posted doesn't stop the popup that you just showed?

Posted: Wed Jun 03, 2009 11:20 am
by Trond
I don't know.
Edit: oh it does.

Re: WebGadget flag to hide error popups

Posted: Sat Apr 27, 2013 7:15 pm
by jesperbrannmark
no that normal user message still popup - so we dont supress any "errors" (what is a error to IE is not what is a error to the rest of the world)

Re: WebGadget flag to hide error popups

Posted: Sat Apr 27, 2013 9:16 pm
by IdeasVacuum
It is an issue, seems there is a lot of incompatibility with javascript. Suppress the messages yes. Better web engine for Windows, yes yes.