Custom JavaScript examples - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Custom JavaScript examples (/showthread.php?tid=275) |
RE: Custom JavaScript examples - serkank - 26.04.2021 can i access to a visulation object properties with javasciript ? for example if i add a button from visulation object , can i get/Set Name , Grup , Touch icon , On icon , Off icon ? RE: Custom JavaScript examples - admin - 26.04.2021 You cannot change these properties from the JavaScript side. You can only access the mapped object / status group address via "object" and "status-object" data properties of each element. Can you explain what exactly are you trying to achieve? RE: Custom JavaScript examples - serkank - 26.04.2021 (26.04.2021, 09:51)admin Wrote: You cannot change these properties from the JavaScript side. You can only access the mapped object / status group address via "object" and "status-object" data properties of each element. I want add a object in visulation and with javascript i change this object with <Div> ,<img> , <input> and Css Style For Example
i want a button Send a 1 byte value (1=Comfort Mode , 4=Protection Mode )
RE: Custom JavaScript examples - tigi - 29.06.2021 I haven't read the full thread, so maybe it's already asked,... 1. How can I make a certain 'text label object' align from the center out instead from the left. Now when a value gets updated with a longer string it is ankered at the left and expands at the right. 2. How can I make a certain 'text label object' center it's object to the page size, so it is always centered Now when I load the visualisation on a pc and smartphone the text object shifts in the left-right direction, probably based on resolution differences and the rendering of text I guess. It doesn't do that with other objects. RE: Custom JavaScript examples - admin - 29.06.2021 See this: https://forum.logicmachine.net/showthread.php?tid=56 RE: Custom JavaScript examples - khalil - 05.07.2021 (11.10.2019, 19:46)Erwin van der Zwart Wrote: Hi, thanks for this good JS how to make the background read-only, means if I click outside the widget -where there are lights, shutters,....- the widget will close and nothing will be changed in the background Please see the attached Built-in 251.600 6 byte DALI RGBW object widget any idea @ admin RE: Custom JavaScript examples - tigi - 07.07.2021 (29.06.2021, 16:46)admin Wrote: See this: https://forum.logicmachine.net/showthread.php?tid=56 Thank you, however this didn't solve the problem completely when viewing the visualization on a pc or smartphone, there was still shifting of the text field itself I ended up making a custom .lp file with html, css, embedded lua code, saved it in user dir and loaded it as iframe, now cross-devices it shows the same. I would like to implement more this way but I'm currently struggling to find a wysiwyg html5 editor which I can use to design those pages. I found Bluegriffon, which is in a sense very good but it's auto-correction feature messes up the lua embedded code, it can only handle php embedded code. Now I'm using placeholder text and replace these afterwards in notepad++ with the lua embedded code, not really convenient. Can anyone suggest a good (free) wysiwyg html(5) editor that leaves lua embedded code intact? RE: Custom JavaScript examples - mitja.perko - 18.08.2023 Hello everyone I would like to program a calculation for a heating curve and also display it. This should look similar to the normal trends. Can someone tell me which frameworks or libraries the trends were realized with? RE: Custom JavaScript examples - admin - 18.08.2023 See this: https://forum.logicmachine.net/showthread.php?tid=4202 RE: Custom JavaScript examples - mitja.perko - 18.08.2023 (18.08.2023, 12:24)admin Wrote: See this: https://forum.logicmachine.net/showthread.php?tid=4202 Can't I use the css and js that are already included on the logicmachine. It should look the same, just slightly modified. RE: Custom JavaScript examples - admin - 18.08.2023 You can but we don't have any documentation or examples on how to use trends library for custom charts. RE: Custom JavaScript examples - Joep - 21.03.2024 (17.03.2018, 13:39)Erwin van der Zwart Wrote: Hi, Hi Erwin, I've modified your example to a version that only does the logout part without the goto startpage part as you can see in the script below. Only issue is that the iframe part is not working any longer and i can't figure out how to solve this. Do you have any idea? Code: $(function() { RE: Custom JavaScript examples - sgraystar - 07.04.2024 Joep, try changing this Code: $('iframe').load(function() { Code: $('iframe').on('load', function() { RE: Custom JavaScript examples - sgraystar - 08.04.2024 Hi Erwin, Thank you for the many useful posts on these forums. A question on the timeout to home page in combination with edgar's doorbell script. If I open the doorbell page manually by clicking a button the timeout script works, but if I open the same page by the doorbell script with showPlan(id) the timeout script does not work. Is this expected? I have implemented a workaround by adding an invisible button to auto click and open an invisible widget on the doorbell page. Is there a better way? Cheers RE: Custom JavaScript examples - admin - 08.04.2024 Use this revised version. The timeout timer is reset when a plan changes (either by user interaction or by calling showPlan): Code: $(function() { RE: Custom JavaScript examples - Joep - 08.04.2024 (08.04.2024, 10:11)admin Wrote: Use this revised version. The timeout timer is reset when a plan changes (either by user interaction or by calling showPlan): It still doesn't work for iframes unfortunately. RE: Custom JavaScript examples - admin - 08.04.2024 It should be $('iframe').on('load', ... instead of $('iframe').load(... But keep in mind that this won't work for iframes that are on a different IP/domain due to browser's security policies. RE: Custom JavaScript examples - sgraystar - 09.04.2024 Thanks admin RE: Custom JavaScript examples - iridium - 23.07.2024 Hello, Is it possible to modify the group addresses of an object? I need 70 identical widgets that only change the group addresses. Is it possible to modify these addresses according to the object that calls the widget? Thanks RE: Custom JavaScript examples - admin - 24.07.2024 Check this: https://forum.logicmachine.net/showthread.php?tid=2717&pid=17512#pid17512 |