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.

Alert manager ipk
#5
Only possible when the app is embedded via iframe into your visu, here is a sample custom JS that makes some interaction possible:
Code:
$(function() {


    // Remote Press Acknowledge Button
    $(document).ready(function() {
        var f = $('iframe');
        f.load(function() {
            if (typeof grp != 'undefined') {
                grp.listen('0/3/0', function(object, state) {
                    if (state == 'value' && object.value == true) {
                        f.contents().find('#AcknowledgeButton').click();
                    }
                }, true);
            }
        });
    });

    // Remote Press Mute Button
    $(document).ready(function() {
        var f = $('iframe');
        f.load(function() {
            if (typeof grp != 'undefined') {
                grp.listen('0/3/1', function(object, state) {
                    if (state == 'value' && object.value == true) {
                        f.contents().find('#MuteButton').click();
                    }
                }, true);
            }
        });
    });

    // Write to object when Acknowledge is pressed by a user
    $(document).ready(function() {
        var f = $('iframe');
        f.load(function() {
            f.contents().find('#AcknowledgeButton').click(function() {
                grp.write('0/2/0', false)
            });
        });
    });


    // Write to object when Mute is pressed by a user
    $(document).ready(function() {
        var f = $('iframe');
        f.load(function() {
            f.contents().find('#MuteButton').click(function() {
                grp.write('0/2/0', true)
            });
        });
    });

    // Hide Acknowledge Button
    $(document).ready(function() {
        var f = $('iframe');
        f.load(function() {
            f.contents().find('#AcknowledgeButton').hide();
        });
    });

    // Hide Mute Button
    $(document).ready(function() {
        var f = $('iframe');
        f.load(function() {
            f.contents().find('#MuteButton').hide();
        });
    });

});
Reply


Messages In This Thread
Alert manager ipk - by CristianAgata - 26.02.2025, 06:26
RE: Alert manager ipk - by Daniel - 26.02.2025, 08:29
RE: Alert manager ipk - by khalil - 11.03.2026, 11:15
RE: Alert manager ipk - by Erwin van der Zwart - 2 hours ago
RE: Alert manager ipk - by Daniel - 11.03.2026, 13:31

Forum Jump: