Posts: 6
Threads: 2
Joined: Jul 2019
Reputation:
0
Would it be possible to write using JavaScript an Alert screen - but more advanced than just an alert call...
Would like just an OK button - but showing a graphic image...
How can JavaScript reference items in the graphic library (if at all) ?
Just thinking of a weekly reminder to put the rubbish bins out - having a picture of the rubbish bin and an OK button....
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
21.07.2019, 07:58
(This post was last modified: 21.07.2019, 08:08 by Erwin van der Zwart.)
Hi,
What you could do is create separate plans with the messages you like to show and jump to the desired plan by a KNX value. On each message plan you create a OK button that makes the visu jump back to the start page. This requires a few lines of JS.
To change the plans with KNX value you need a small LUA event based script that is triggered by binary objects with tag 'messages'. If a object with a certain name gets true you change a KNX object to a certain value and the visu will show the message you created.
Is this something you search? I have already JS and LUA scripts that does these things.
Another way is to build real HTML pop-ups that holds icons etcetera with JS on the fly, but this is a lot more complex.
BR,
Erwin
Posts: 6
Threads: 2
Joined: Jul 2019
Reputation:
0
21.07.2019, 09:14
(This post was last modified: 21.07.2019, 10:29 by impactoz.)
I do like your idea - really simple by creating a new plan... But my initial thought would be that plan would then be visible on the drop down menu - and I would not want that to be seen....
Searching found I can change this via the CSS
#menu-plan-14 { display:none; }
So I am on the path to progress... Playing around is fun - just need a little knowledge...
Is there an easy way to make this modal - so the user is unable to select anything else other than the button I supply on the popup
Thanks