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.

Change value from link
#1
Hi

I'm wondering if it's possible to change value on a grp address from a "link" with additional classes.

I want to change a grp address value when i change page with a button using "link"

Best regards
Marcus
Reply
#2
Use Custom Javascript with Jquery for that. I Think something like the script below will do the magic for you.

$(function() {
$(".usermode").find(".link").on('click touchstart', function() {
--do something
});
});
Reply
#3
(10.04.2020, 12:34)Joep Wrote: Use Custom Javascript with Jquery for that. I Think something like the script below will do the magic for you.

$(function() {
  $(".usermode").find(".link").on('click touchstart', function() {
      --do something
  });
});

This sounds like what I am after, as I too have a request, but I have no idea how Jquerys work or how to implement them.
a bit more explanation around this by anyone would be greatly appreciated
Reply
#4
Please explain what exactly do you want to achieve. It will be much easier to provide an example then.
Reply
#5
(23.09.2021, 09:38)admin Wrote: Please explain what exactly do you want to achieve. It will be much easier to provide an example then.

What I am wanting to achieve is when the client presses a button on one screen it triggers a KNX group address, and jumps to another page.

This particular command will trigger a TV system to power on, and the jump is to jump to a page with various media systems controls

Then I want the reverse of this possible too, where there is a button on the media systems control page which will trigger an A/V system shutdown and jump page to the main page, ready to go again.

Thanks in advance for any help around this.
Reply
#6
Create an Object element mapped to the required group address. Set the Additional classes property to showplan showplan-123 (change 123 to the plan ID that you want to show). Plan ID can be found in the plan properties (Vis. structure). Add to custom JavaScript (Scripting > Tools > Edit custom JavaScript):
Code:
$(function(){
  $('.showplan').on('vclick', function() {
    var matches = this.className.match(/showplan\-(\d+)/);
    if (matches) {
      showPlan(Number(matches[1]));
    }
  });
});
This will only work in the visualization viewer but not in the editor.
Reply


Forum Jump: