The following works here.

on browserNavigateBegin pUrl
  put the URL of widget "browser" into uri
  put pURL &cr& uri &cr & (uri begins with "http://livecode.com";)
end browserNavigateBegin

Possibly your URL conflicts with the standards-compliant URL?

> Tore N. wrote:
> 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?

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to