revBrowser javascript error | SOLVED

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

revBrowser javascript error | SOLVED

Post by Johan_VH » Tue Oct 14, 2014 1:00 pm

Hi all,

I'm trying to set up an infokiosk which allows our visitors to visit 3 different sites. I installed software for it , but it still allows them to browser to other websites sometimes, no matter if I only whitelisted those three sites.

So, obvious solution: make it myself in LiveCode. However, 2 of the 3 sites run javascript and it throws an error. Even when I used the example browser from Resources\Examples I get this error. Is there any way to prevent this via some obscure setting? I found that on windows revbrowser uses IE explorer, but the site works fine when I open it there. Also, does this mean it won't work under Linux?

This is one of the offending sites: http://www.delijn.be/en/index.htm

Thanks in advance!

Johan
Last edited by Johan_VH on Fri Nov 21, 2014 10:53 am, edited 4 times in total.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: revBrowser javascript error

Post by LCNeil » Tue Oct 14, 2014 1:06 pm

Hi Johan,

I would recommend checking out our new browser implementation in LiveCode 6.7/7.0 as this no longer requires Internet Explorer on Windows and Safari on Mac.

You will be able to download builds of these from out main downloads repository here-

http://downloads.lvecode.com/livecode

The new browsers uses the Chromium Embedded Framework (CEF). It is currently ported to Mac and Windows within LiveCode but will soon be arriving on Linux :)

Keep us posted on how you get on

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.runrev.com
--

Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

Re: revBrowser javascript error

Post by Johan_VH » Tue Oct 14, 2014 1:28 pm

Yes it does the trick!

I'm already running 7.0, so I didn't need to download anything either. Thanks a million!

Now let's see if I can get it nailed shut so the visitors can't visit any nature-sites anymore ;-)

Johan

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: revBrowser javascript error | SOLVED

Post by LCNeil » Tue Oct 14, 2014 2:04 pm

Great to hear that the CEF browser works :)

Something like this should limit users to where they can navigate to (place it in your stack script and set for your browser id)

Code: Select all

on browserBeforeNavigate pInstanceId, pUrl
   put pUrl into tUrl
   if tURL contains "delijn" then
   else
      answer "you are not allowed to navigate here"
      revBrowserSet tBrowserID, "url", "http://www.delijn.be/en/index.htm"
   end if
end browserBeforeNavigate
Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.runrev.com
--

Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

Re: revBrowser javascript error | SOLVED

Post by Johan_VH » Thu Oct 16, 2014 9:22 am

Thank you!!

Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

Re: revBrowser javascript error | SOLVED

Post by Johan_VH » Thu Nov 20, 2014 4:27 pm

Finally implementing my program, but the runtime's CEF just gives a white screen, whereas it works in the authoring environment... Help!



EDIT: solved it myself http://forums.livecode.com/viewtopic.ph ... 80#p113980

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: revBrowser javascript error

Post by LCNeil » Fri Nov 21, 2014 10:53 am

LiveCode should automatically include any script libraries that are required for the CEF browser to operate but it could be that this in not being included for some reason. As a test, please include this manually via the "General" pane of your stacks standalone application settings. Below is screenshot showing this-
Screen Shot 2014-11-21 at 09.51.56.png

Johan_VH
Posts: 67
Joined: Fri Mar 28, 2014 2:46 pm

Re: revBrowser javascript error | SOLVED

Post by Johan_VH » Fri Nov 21, 2014 12:09 pm

Yep, that works! But you have to include all the rest too then, in my case the XML library, but it's easier than having to copy it manually of course!

Another lesson learned :-)

Post Reply