Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible Bug in Web Browser Widget or SetURL
#1
I have been using the Web Browser Widget to display a Radar for the last couple of years, and had no issues with it, but I am thinking something might of changed in one of the last betas.

What I have on the template is a Web Browser Widget and it reads an html file with a SetURL command in the OnPreLoad - This all displays fine.

On the same template I have a slider, that based on where it is, calls another SetURL command which loads a different .html file.  In this case, it will just show a black screen in the widget.  I can refresh it, and it will then load the OnPreLoad SetURL and display the current setting that was changed in the slider.

No errors are in the logs, it just looks like it doesn't fully execute the SetURL.  

Here is the code for the OnPreLoad:
Code:
If Not
GlobalVars::Exists
    P1=GVar:WeatherRadarZoom

GlobalVars::CreateVariable
    P1=GVar:WeatherRadarZoom
    P2=Int
    P3=Range: 1, 10
    P4=4

Radar::SetURL
    P1=http://cqcserver:8003/Radar/RadarBig_Zoom4_Aerial.html

Else

LocalVars::SetVariable
    P1=LVar:Webpage
    P2=http://cqcserver:8003/Radar/RadarBig_Zoom%(GVar:WeatherRadarZoom)_Aerial.html

Radar::SetURL
    P1=%(LVar:Webpage)

End

Here is the code for when the slider is moved:
Code:
LocalVars::SetVariable
    P1=LVar:Webpage
    P2=http://cqcserver:8003/Radar/RadarBig_Zoom%(GVar:WeatherRadarZoom)_Aerial.html

Radar::SetURL
    P1=%(LVar:Webpage)
Reply
#2
A slider is going to send values way too fast for that. You'll be blasting it like crazy, because it's going to try to load every one of those in sequence that you pass over. I would either use buttons, or have the slider just display the one you've slid to and provide a button to select it, which you show if the one you've selected is different from the previous one or something like that.

But for a quick test, just make a dummy template with a few buttons that set the URL and see if it works like that. If so, it's probably related to the overly quick setting via the slider which is now outright fatal, whereas before it managed to survive it. If it still doesn't work that might point to something worse.
Dean Roddey
Explorans limites defectum
Reply
#3
(04-26-2020, 07:13 AM)Dean Roddey Wrote: But for a quick test, just make a dummy template with a few buttons that set the URL and see if it works like that. If so, it's probably related to the overly quick setting via the slider which is now outright fatal, whereas before it managed to survive it. If it still doesn't work that might point to something worse.

I tried that with the same results, just hardcoding the webpage into a command button.  The webpage works fine in a chrome browser.

Code:
LocalVars::SetVariable
    P1=LVar:Webpage
    P2=http://cqcserver:8003/Radar/RadarBig_Zoom10_Aerial.html

Radar::SetURL
    P1=%(LVar:Webpage)
Reply
#4
Anyone else seeing this problem?
Dean Roddey
Explorans limites defectum
Reply
#5
(04-26-2020, 04:42 PM)Dean Roddey Wrote: Anyone else seeing this problem?
Yes, but I am using the same template as kblagron

Thank you
Reply
#6
I found a work around on this - and it very well may be a timing issue.  What I noticed when I used a command button .vs. the Slider widget was that it provided one more option which was a "reload" option for the Web page.  That alone didn't fix it, but when I put a WaitTimer command in between the SetURL and Reload, the buttons started working as expected.  I actually like the buttons better than the slider, so all is good.

The code is below:

Code:
GlobalVars::SetVariable
    P1=GVar:WeatherRadarZoom
    P2=1

LocalVars::SetVariable
    P1=LVar:Webpage
    P2=http://cqcserver:8003/Radar/RadarBig_Zoom%(GVar:WeatherRadarZoom)_Aerial.html

Radar::SetURL
    P1=%(LVar:Webpage)

System::WaitTimer
    P1=0
    P2=1000

Radar::Navigation
    P1=Reload
Reply
#7
You shouldn't need the reload, so something is awry. I'll look at it.
Dean Roddey
Explorans limites defectum
Reply
#8
Nothing has changed on the web browser widget in quite a while, so I don't think I broke anything. It may be something different because it's running some sort of active script or something I dunno. Can you test the command on just some more regular page and see if that works without a reload?
Dean Roddey
Explorans limites defectum
Reply
#9
I reconfigured the way I pull up this template, and it fixed the problem.  Before, I had the WebBrowser Widget on the same page as the buttons (and previously slider) and had these problems.  I changed it so that I load an Overlay that contains the WebBrowser Widget, and then SetURL once the Overlay gets called up.

I wouldn't spend anymore time on this, as I think it is probably related to this Radar html file I am using which is Javascript that ties in two different websites to get the radar in motion working.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  URL vs WebURL in Camera Widget gReatAutomation 1 968 12-31-2020, 08:36 AM
Last Post: Dean Roddey
  Camera Widget - URL, WebURL and Viewing While Not on Local network gReatAutomation 5 1,728 10-26-2020, 03:47 PM
Last Post: Dean Roddey
  Widget color and states bryanb 10 3,014 08-14-2020, 03:29 PM
Last Post: Dean Roddey
  I cant enter parameters for sizing into the webcam widget. I get errors about invalid ghurty 2 1,562 04-29-2020, 04:01 PM
Last Post: Dean Roddey
  With webriva, anyway to get an embedded browser window? ghurty 1 1,096 04-26-2020, 04:43 PM
Last Post: Dean Roddey
  Check Box widget on WebRIVA vs Interface Viewer bryanb 1 1,305 04-23-2020, 06:15 AM
Last Post: bryanb
  Widget: Web Browser simplextech 4 2,437 01-12-2020, 12:47 PM
Last Post: simplextech
  Increment web image widget NishanF 5 2,398 10-24-2019, 08:16 AM
Last Post: Dean Roddey
  Image Browser? gReatAutomation 8 3,119 06-26-2019, 06:12 PM
Last Post: gReatAutomation
  Google Calendar and Web Browser kblagron 4 2,294 04-25-2019, 10:10 PM
Last Post: kblagron

Forum Jump:


Users browsing this thread: 1 Guest(s)