Page 1 of 1

Flash Player error with Browser widget

Posted: Thu Nov 14, 2019 12:52 pm
by Zax
Hello,

I sometimes encounter an error with a Browser widget. LC displays this modal dialog alert:
Capture d’écran 2019-11-14 à 12.47.24.jpg
First, I don't understand the reason of this alert, but maybe it's due to the loaded website.
The real problem is that this alert is modal. Is there another way to display this errors, non-blocking, in order to continue processes ?

I'm using LC Indy 9.04.

Thank you.

Re: Flash Player error with Browser widget

Posted: Thu Nov 14, 2019 1:20 pm
by Klaus
Hi Zax,

do you see the dialog(s) also when you go to these webites with e.g. "Safari"?
If yes, then you cannot do anything against this.


Best

Klaus

Re: Flash Player error with Browser widget

Posted: Thu Nov 14, 2019 2:23 pm
by Zax
Hello Klaus,

No, I never encounter this flash alert when using Firefox on MacOS Sierra and Windows 10.
Once again, this strange Flash error is not the real problem. My problem is how to continue process. Maybe I could use lock error dialogs?

Re: Flash Player error with Browser widget

Posted: Thu Nov 14, 2019 2:45 pm
by Klaus
Hm, sorry, no idea if "lock error dialogs" will work for the browser widget.

Re: Flash Player error with Browser widget

Posted: Thu Nov 14, 2019 2:47 pm
by Zax
Klaus wrote:
Thu Nov 14, 2019 2:45 pm
Hm, sorry, no idea if "lock error dialogs" will work for the browser widget.
I just tried: "lock error dialogs" *not* works for the browser widget. :(

Re: Flash Player error with Browser widget

Posted: Tue Nov 19, 2019 1:05 pm
by Zax
Well, I found a hack... in one of your old post, Klaus :)

https://forums.livecode.com/viewtopic.php?t=17860
Klaus wrote:
Wed Nov 06, 2013 7:12 pm

Code: Select all

on mouseUp

  ## Important part to send BEFORE the dialog ;-)
  send "closeit" to me in 2 secs
  answer "sfasdfasdfasdfasdf"
end mouseUp

command closeit
  close stack "Answer Dialog"
end closeit

Re: Flash Player error with Browser widget

Posted: Tue Nov 19, 2019 1:15 pm
by Klaus
HA! :D


Your message contains 6 characters.
You need to enter at least 10 characters.

Re: Flash Player error with Browser widget

Posted: Tue Nov 19, 2019 1:45 pm
by Zax
Klaus wrote:
Tue Nov 19, 2019 1:15 pm
Your message contains 6 characters.
You need to enter at least 10 characters.
sfasdfasdfasdfasdf

;)

Re: Flash Player error with Browser widget

Posted: Tue Nov 19, 2019 4:28 pm
by Zax
Bad news (for me):

Alerts sended by the Browser widget are not treated as "Answer" modal dialogs. It can be easily tested by adding a Javascript with "alert('JS alert');" to the widget.
Though "regular" answers are well dismissed with Klaus' script, modal dialogs sended by the widget are not.

Still looking for a way to dismiss these blocking modal dialogs...

Re: Flash Player error with Browser widget

Posted: Wed Nov 20, 2019 10:06 am
by [-hh]
The script below *disables* ALL alerts on the current page.

If you wish to show instead a LC non-modal warning write a javascriptHandler and insert it in the JS function below.

Code: Select all

on mouseUp
   do "window.alert=function(){};" in widget "browser"
end mouseUp
or (if you have full control about the content of the widget) add this as

Code: Select all

<script>window.alert=function(){};</script>
just before "</body>" to your htmltext/web page content.

Re: Flash Player error with Browser widget

Posted: Wed Nov 20, 2019 2:16 pm
by Zax
Thanks [-hh], I didn't know this way of trapping JS alerts.
Unfortunately, in my case, this strange "Flash" alert sent by the widget is not trapped and displays a modal dialog (though regular JS alerts are well trapped).

Re: Flash Player error with Browser widget

Posted: Wed Nov 20, 2019 2:48 pm
by Klaus
If you do not see this when going to that url in SAFARI, you should report this as a bug:
https://quality.livecode.com

Re: Flash Player error with Browser widget

Posted: Wed Nov 20, 2019 3:11 pm
by Zax
I think the alert came from nasty advertising, and it only happens some times, but I finaly encountered it with Safari :
Capture d’écran 2019-11-20 à 15.07.37.jpg
I don't understand why it is not trapped with JS, but I don't know how Chromium engine works.

Re: Flash Player error with Browser widget

Posted: Wed Nov 20, 2019 6:10 pm
by [-hh]
This isn't an ordinary alert, you can see that from the "Annuler" option.
LC interprets that as "error/missing plugin". This isn't trappable in the widget, is part of libbrowser...

Re: Flash Player error with Browser widget

Posted: Thu Nov 28, 2019 2:58 pm
by Zax
[-hh] wrote:
Wed Nov 20, 2019 6:10 pm
This isn't an ordinary alert, you can see that from the "Annuler" option.
It's an ordinary JS confirm, screened form localized french Safari. So I extend your JS script in order to hack JS confirm and so far it seems to work :)
I think LC displays original JS confirms as LC alerts - see my first screen.