Restrict navigation in browser widget

Tore Nilsen tore.nilsen at me.com
Wed Jul 26 05:58:39 EDT 2017


I am currently preparing the coursework for next years classes in programming. Working with the browser widget, I am trying to restrict navigation in a a widget to a specific domain, but have run into a problem I can not get my head around. I use the browserNavigateBegin message to capture the url that the widget tries to navigate to. This works fine if I make a direct comparison of the parameter pUrl and a specific target url. (ex. pURL = "http://vg.no <http://vg.no/>"). If I try to make a comparison of pUrl to the first part of a specific domain, it fails. (ex. pUrl begins with “http://vg.no <http://vg.no/>”) I have checked to see if “begins with” works outside of the browser widget, and it does. I also find it intriguing that I can set the url of the widget, but I can not get it. How do others restrict navigation in a browser widget?

Regard
Tore Nilsen


More information about the use-livecode mailing list