Quasi Student Secure Web Browser?

JOHN PATTEN johnpatten at me.com
Wed Mar 29 21:32:12 EDT 2017


Hi All,

I’m attempting to create a simple secure web browser iOS app for some teachers. I want to prevent any links within an approved site (i.e. “www.approvedsite.com") that link out to others sites from launching. For example, if the "www.approvedsite.com" has a link out to Youtube.com, I want to detect that it is outside the target site and prevent it from loading in the browser object. If the link is within the approved site, i.e. "www.approvedsite.com/anotherpage.html,” I want to allow that page to load in the browser object.

At first I thought i would use a widget, but then did not see any command that would get the url. So, I switched gears and went with the mobileControlCreate browser strategy.  I thought I could use the browserStartedLoading command, but I’m not quite sure how to go about it. 

I am not sure how to capture the link url when the user clicks/taps on the link in the browser, and then check it against acceptable urls? 

I had this is the card script:

on browserStartedLoading pUrl
put pUrl into tUrlLoading
wait 50
answer tUrlLoading
set the itemdel to "/"
answer item 2 of tUrlLoading
if item 2 of tUrlLoading is not "www.myopenmath.com" then
answer “You can not access this site."
end if
end browserStartedLoading


Is there a better way to go about accomplishing this in LiveCode?

Thank you!

John Patten
SUSD








More information about the use-livecode mailing list