Run JavaScript code on press of a button in Perspective

Is there any way to run a JavaScript code on press of a button in perspective?

only if you make your own module,
maybe with the webdev module, but i never used it.

What are you trying to do that requires js?

I have made a webdev module, don’t know how to make it run when I press a button. I can just return some value on press of button.
I’m trying get an alert message if there is inactivity for 3 sec.

i dont really know how webdev module works, but my guess is if you make a html page with a button and its script you can show it in perspective with the inline frame…

For a simple alert message you might just want to open a popup in perspective instead though xd
There should be a session prop lastActivity since version 8.1.8 (?)
3 sec is not a lot though btw :stuck_out_tongue:


yeah. That’s the right way to do it. But since I’m not using the latest version. I was trying to implement it using JavaScript.