Logic Machine Forum
Alert page .. (Example) - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Alert page .. (Example) (/showthread.php?tid=412)



Alert page .. (Example) - buuuudzik - 06.10.2016

Hello,

I've tried to use the example from openrb.com:
http://openrb.com/alert-page-in-visualization-with-sound-notification/


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?


RE: Alert page .. (Example) - Erwin van der Zwart - 06.10.2016

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


RE: Alert page .. (Example) - buuuudzik - 06.10.2016

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)



RE: Alert page .. (Example) - buuuudzik - 07.10.2016

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?


RE: Alert page .. (Example) - buuuudzik - 07.10.2016

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);
});