Skip to content
View in the app

A better way to browse. Learn more.

Young Composers Music Forum

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.

Post button problems

Featured Replies

Earlier today I added some Javascript to every page which disabled the "Add Reply" button once it was clicked in an attempt to stamp out double posting around these parts. Unfortunately, I neglected to check the code for cross-browser compatibility, and it seems that in some browsers it just disabled the element and did nothing further.

I've removed the code for now, I may come up with something else later. Apologies to all those affected.

It would be quite easy to make a lock in php which disables requests to post for a limited period of time.

Eg.

Poster clicks button

Check lock file

If lock file is still valid, do nothing

If lock file is not existant or no longer valid, create (new) lock file (either in memory or on disc) with date and time of post and allow the new post to be created

You may know a more efficient way of doing this...

  • Author

Sounds a bit complicated, especially since it would have to be integrated with the board's codebase. Much simpler to do something like this with Javascript from the client side.

Anyway, I've redone the code. This time it should work in all popular browsers at the very least (tested in Firefox, IE and Opera). For the changes on the full Add Reply page to take effect, users may need to restart their browser, or failing that, empty their cache. If anyone experiences problems, please let me know.

Let's now test accidental multiple posting.

Edit: Yep, seems to work. I pressed the button about ten times before the topic page loaded with the new reply.

Edit2: I'm using Firefox 1.5.0.3 on Linux, if that info is useful to know...

  • Author
Edit2: I'm using Firefox 1.5.0.3 on Linux, if that info is useful to know...

You should probably update Firefox in that case. 1.5.0.6 is the latest version. :innocent:

Perhaps I'll compile it tomorrow. It's only a minor revision, so it's probably not that urgent an upgrade. I don't really subscribe to the 'latest is best' ethos. I'm still on a 2.6.16 kernel on this machine!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.