Zoom iframe possible?

hi, is there any way to change the zoom level from an iframe window using a variable? So I could change it in the dashboard by a button

[
    {
        "id": "bd76668e.c11518",
        "type": "function",
        "z": "239682fe.680d0e",
        "name": "",
        "func": "msg.payload = \"https://website.com\" + msg.payload;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1520,
        "y": 240,
        "wires": [
            [
                "cdf7ea5b.21de78"
            ]
        ]
    },
    {
        "id": "cdf7ea5b.21de78",
        "type": "ui_template",
        "z": "239682fe.680d0e",
        "group": "e664d20c.1424b",
        "name": "Website iframe",
        "order": 1,
        "width": "32",
        "height": "20",
        "format": "<iframe id=\"myFrame\" width=\"100%\" height=\"100%\" src = \"\"></iframe>\n<script>\n(function(scope) {\n    // watch msg object from Node-RED\n    scope.$watch('msg', function(msg) {\n        // new message received\n        var x = document.getElementById('myFrame');\n        x.setAttribute('src', msg.payload); \n        });\n})(scope);\n</script>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": false,
        "templateScope": "local",
        "x": 1770,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "e664d20c.1424b",
        "type": "ui_group",
        "name": "Uebungsprogramm",
        "tab": "f01ad79b.4c5be8",
        "order": 3,
        "disp": false,
        "width": "32",
        "collapse": false
    },
    {
        "id": "f01ad79b.4c5be8",
        "type": "ui_tab",
        "name": "Ereignismonitor",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

hi, it is not quite as intended above, however it would also be a possibility to change the zoom factor of the iframe window. I store the value 100% or 75% in the variable "zoom". However, it does not take over the "zoom" value in the "template node" for me. What am I doing wrong?

[{"id":"efbb397b.e9a2f8","type":"ui_template","z":"239682fe.680d0e","group":"e664d20c.1424b","name":"iframe","order":1,"width":"32","height":"20","format":"<iframe id=\"myFrame\" width=\"100%\" height=flow.get(\"zoom\") src =\"'+msg.payload+'\" frameborder=\"0\"></iframe>\n<script>\n(function(scope) {\n    // watch msg object from Node-RED\n    scope.$watch('msg', function(msg) {\n        // new message received\n        var x = document.getElementById('myFrame');\n        x.setAttribute('src', msg.payload); \n        });\n})(scope);\n</script>\n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1150,"y":640,"wires":[[]]},{"id":"9b84d001.01388","type":"inject","z":"239682fe.680d0e","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"100%","payloadType":"str","x":430,"y":640,"wires":[["967a9757.9a54a8"]]},{"id":"ecc2f03a.6a0fc","type":"debug","z":"239682fe.680d0e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"topic","statusType":"auto","x":870,"y":640,"wires":[]},{"id":"967a9757.9a54a8","type":"function","z":"239682fe.680d0e","name":"","func":"flow.set(\"zoom\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":660,"y":640,"wires":[["ecc2f03a.6a0fc"]]},{"id":"777db973.f5a2b8","type":"inject","z":"239682fe.680d0e","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"75%","payloadType":"str","x":430,"y":680,"wires":[["967a9757.9a54a8"]]},{"id":"e664d20c.1424b","type":"ui_group","name":"Uebungsprogramm","tab":"f01ad79b.4c5be8","order":3,"disp":false,"width":"32","collapse":false},{"id":"f01ad79b.4c5be8","type":"ui_tab","name":"Ereignismonitor","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.