![]() |
|
Javascript on Trends Page - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: OLD visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9) +--- Thread: Javascript on Trends Page (/showthread.php?tid=6262) |
Javascript on Trends Page - jmir - 22.01.2026 Hi, Is Custom javascript running on trends page? I want to use a function to jump to visu start page after a time when no activity, but on trends page (and schedulers) it doesn't work... Is there any way to do it? RE: Javascript on Trends Page - admin - 22.01.2026 Post your script. RE: Javascript on Trends Page - jmir - 22.01.2026 (22.01.2026, 07:04)admin Wrote: Post your script. I'm using this: https://forum.logicmachine.net/showthread.php?tid=3458&highlight=logout RE: Javascript on Trends Page - admin - 22.01.2026 It won't work because certain variables (currentPlanId) and functions (showPlan) are not defined in trends. Try this for trends and schedulers. Adjust timeout value and location as needed. Code: $(function() {RE: Javascript on Trends Page - jmir - 22.01.2026 (22.01.2026, 07:49)admin Wrote: It won't work because certain variables (currentPlanId) and functions (showPlan) are not defined in trends. Hi, It works! Is there a way to adapt this function so that it also works in the visualisation and redirects to a specific plan? RE: Javascript on Trends Page - admin - 22.01.2026 Replace window.location = '/apps/' with this, change 123 to the real plan ID: Code: if (window.showPlan) {RE: Javascript on Trends Page - jmir - 22.01.2026 Hi, It works, I've added body.hasClass('usermode') and an extra if to check if we're on initial plan Perhaps something can be improved... Code: $(function() { |