This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Alert page .. (Example)
#1
Hello,

I've tried to use the example from openrb.com:
http://openrb.com/alert-page-in-visualiz...ification/


But there is a problem somewhere here:
Code:
    if Page_Adding == true then
      -- Create alert page if alert page doesn't exist
      db:insert('visfloors', {building = alert_page_building, layout = alert_page_layout, sortorder = highest_sortorder, name = Alert_Page_Name, bgrepeat = 0, bgfixed = 0, adminonly = 0, width = alert_page_width, height = alert_page_height,})
    end
     
    -- Get page number of new created alert page
    alert_page_number = db:getone('SELECT id FROM visfloors WHERE name=?', Alert_Page_Name)

What is the problem?
Reply
#2
Have you set a default page? (show, make default) in the vis structure?

This page is used as template for alertpage. (Size etc is copied)

The script is not usable on latest FW as far as i know.

Planning to make app for this (:

BR,

Erwin
Reply
#3
Yes, when I started I had the error about there is no homepage. But I solved it and now I have another error about:
Code:
Line 384: attempt to concatenate global 'alert_page_number' (a nil value)
Reply
#4
How can I do the reload of the page in a frame after every update of some GA? End do you know how to change via script the text on this page in a frame? And how can I change this text to the same value as the last alert?
Reply
#5
This is the javascript function which change color and text in the selector "text"
Code:
$(function(){
 var lowcolor = 'rgb(204, 153, 0)' // Orange
 $(".text").html('Webroad');
 $(".text").html('Webroad').css("color", lowcolor);
});
Reply


Forum Jump: