| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 18/10/2010 17:10:17
|
Jokke
Initiate
Joined: 19/10/2009 05:08:44
Messages: 52
Location: Oulu Finland
Offline
|
Hello,
I have used some server side sripts on graphical views. Some are quite specific for the need. I have tried to make some in more generic way and here are some. I will check if i could clean some others and post here...
These are used as server side script component.
A drop down menu (select) which shows current value. Can set the value by selecting from menu.(edited the code and works now atleast on firefox and on Nokia mobile
checkbox for binary point
Quite simple... a text box (which is printing BCD value as 24h clock time)
Lamp image, clicking on it is setting/resetting a bit in variable
Lamp image clicking on it sets a binary point(from an old example in some other thread)
I hope these are for some use
BR
-Jokke
This message was edited 3 times. Last update was at 21/10/2010 17:28:57
|
Mango for HA |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 20/10/2010 23:38:55
|
JoelHaggar
Initiate
Joined: 31/07/2010 19:35:48
Messages: 55
Location: Boulder, Colorado
Offline
|
Hey Jokke,
Thanks so much for these. The first two are awesome. I which I understood javascript better so I could do stuff like this.
The drop down didn't seem to set the point in google chrome browser but worked great in firefox.
Thanks,
Joel.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 21/10/2010 13:20:06
|
Jokke
Initiate
Joined: 19/10/2009 05:08:44
Messages: 52
Location: Oulu Finland
Offline
|
Hi Joel,
These examples are based on "onclick" event. It is quite odd method to use it on select option. It would be great to have some form or document (or something similar) function on serverside script. To be able to call this."selectName".... to return the selected value like normal JS way. Having radiobuttons could then also be possible.(it is possible with making several points the same way as checkbox).
Not to disrespect the fancy ajax-thingies, but I find these normal web input types, more usable(I believe I'm not the only one). Of course with ajax to have action without any submit /send/set/refresh buttons.
Maybe a wishlist item to have serverside scrit to have multiple points for the script like meta point...
BR
-Jokke
This message was edited 2 times. Last update was at 21/10/2010 13:23:32
|
Mango for HA |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 21/10/2010 16:27:54
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1502
Offline
|
Have you tried using "onchange" for a select instead of "onclick"?
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 21/10/2010 17:25:23
|
Jokke
Initiate
Joined: 19/10/2009 05:08:44
Messages: 52
Location: Oulu Finland
Offline
|
Yes I first tried with onChange and for some reason I didnt get it working. It was some time ago with earlier mango version.
However now I made a new try and it works. I updated the above post to have a better version of the code.
BR
-Jokke
|
Mango for HA |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 30/10/2010 14:51:25
|
Jokke
Initiate
Joined: 19/10/2009 05:08:44
Messages: 52
Location: Oulu Finland
Offline
|
Here are more select examples as they seem popular.
The simple example which was on the other topic
A generic script for multistate point(uses the text and colour defined in multistate point renderer properties)
One which is quite easy to modify to some specific need
BR
-Jokke
|
Mango for HA |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 30/06/2011 12:58:10
|
fmunhoz
Initiate
Joined: 26/01/2010 10:08:18
Messages: 49
Offline
|
Very useful examples, I would like to set an RTC clock using two select combobox: Hours 0-23 and Minutes 0-59.
The datapoint must be set in seconds, so I need two combos performing some scripting like get the value of hours*3600 plus minutes*60.
I am trying but could not do it yet.
Here is my code, it works outside mango, but could not set the datapoint from this, anyone could help?
This message was edited 1 time. Last update was at 30/06/2011 12:59:00
|
Best Regards
|
|
|
 |
|
|