17.07.2026, 14:52
Hi admin, thanks for this but having a problems trying to impliment.
How do I find the widgetId & frameWidgetId Think I know we know the widgetID , but sure so chcking.
have placed the provide code like this in Custom JavaScript
$(function() {
const widgetId = 18
const frameWidgetId = ?????
Visu.on('widget-ready', widgetId, ({ widget }) => {
const clickHandler = widget.component.compactModeClick
const frame = document.getElementById(`widget-frame-${frameWidgetId}`)
widget.component.compactModeClick = () => {
const shown = widget.component.showPopover
clickHandler()
if (shown) {
frame.src = '/scada-vis/trends?id=1&mode=week'
}
}
})
});
not sure how to tie the button to the function, therefore not sure what to do for button 2, 3, 4, ..... 20 etc.
If you could provide a bit more info, I would appreciate the helping hand
How do I find the widgetId & frameWidgetId Think I know we know the widgetID , but sure so chcking.
have placed the provide code like this in Custom JavaScript
$(function() {
const widgetId = 18
const frameWidgetId = ?????
Visu.on('widget-ready', widgetId, ({ widget }) => {
const clickHandler = widget.component.compactModeClick
const frame = document.getElementById(`widget-frame-${frameWidgetId}`)
widget.component.compactModeClick = () => {
const shown = widget.component.showPopover
clickHandler()
if (shown) {
frame.src = '/scada-vis/trends?id=1&mode=week'
}
}
})
});
not sure how to tie the button to the function, therefore not sure what to do for button 2, 3, 4, ..... 20 etc.
If you could provide a bit more info, I would appreciate the helping hand