Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Execute script on window close?

Featured Replies

I have a feeling this might be a FAQ of sorts; apologies if it is (I tried to find it in the forums). Is there a way to trigger a script when a user tries to close a FM window (or, even better, prevent them from being able to close a window)?

In 8+ Advanced you can create a custom menu and attach a script to the Close Window command (or eliminate it completely).

  • Author

Thanks; I'll give that a try. There's no way to prevent a user from clicking the window's "close" button, though, is there?

Hello,

You can add a trick, so that the Windows Close button cannot perform close.

I combined Allow Abort (Off) and a Pause Script in order to make the Windows Close button cannot work.

You can see the file attached. Hopefully, that the one you requested...

Test.zip

  • Author

Awesome. Thanks!

Thanks; I'll give that a try. There's no way to prevent a user from clicking the window's "close" button, though, is there?

The script you attach to the Close Window command can be as simple as an empty script, so nothing will happen. Not sure what else you could want.

BTW, That sample file is not very helpful if you ever need to run other scripts, or if your user hits the enter key.

Edited by Guest

Hello Dj,

About the sample file that I gave is test purpose only for disabling the Windows Close button. It's a simple trick.

For me, in this condition, if I want to execute the other script, I would Halt the previous script (which contains Pause/Resume script indefinitely). I thought it can work well?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.