Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6694769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:08:24+00:00 2026-05-26T06:08:24+00:00

This tiny JavaScript, along with some CSS is supposed to prevent duplicate entries into

  • 0

This tiny JavaScript, along with some CSS is supposed to prevent duplicate entries into the database by freezing the screen after Submit has been clicked.

So far, out of over 200 people who have used the app to submit entries, 6 of them have managed to submit duplicate entries.

We are suspecting that older browsers may be responsible for the double entries.

We are still investigating.

Could that assumption be correct?

If yes, is there a way to improve this code to work on all browsers?

I would like to keep this code, rather than go for another because of the pleasant look and feel but open to something better.

<script type="text/JavaScript">
    function FreezeScreen(msg) {
        scroll(0, 0);
        var outerPane = document.getElementById('FreezePane');
        var innerPane = document.getElementById('InnerFreezePane');
        if (outerPane) outerPane.className = 'FreezePaneOn';
        if (innerPane) innerPane.innerHTML = msg;
    }
</script>

–CSS

<style type="text/css">
   .FreezePaneOff
   {
      visibility: hidden;
      display: none;
      position: absolute;
      top: -100px;
      left: -100px;
   }

   .FreezePaneOn
   {
      position: absolute;
      top: 0px;
      left: 0px;
      visibility: visible;
      display: block;
      width: 100%;
      height: 100%;
      background-color: #666;
      z-index: 999;
      filter:alpha(opacity=85);
      -moz-opacity:0.85;
      padding-top: 20%;
   }

   .InnerFreezePane
   {
      text-align: center;
      width: 66%;
      background-color: #171;
      color: White;
      font-size: large;
      border: dashed 2px #111;
      padding: 9px;
   }
</style>

******UPDATE******

I am posting my response here since that thing wouldn’t allow me to add comments with the stupid message that only 1 comment per 5 seconds allowed and it has been 10 minutes since the last comment was added.

Thanks alot @PPvG and @Random. Do I need to one of you guy’s script (more likely @Random’s because I don’t understand what @PPvG meant by //…do your submitting stuff…) but do I need to use one of you guy’s js in addition to the one I am currently using? Also, does asp.net allow form action=”~” …?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:08:25+00:00Added an answer on May 26, 2026 at 6:08 am

    I agree with @Random. Just disable the submit button and prevent the form’s default action after submitting once. Something like this:

    var submitted = false;
    var form = document.getElementById('form_id');
    var submitButton = document.getElementById('submit_button_id');
    
    form.onsubmit = function() {
        if (submitted) {
            FreezeScreen("Already submitted!");
            // Stop the form from being submitted a second time:
            return false;
        }
    
        // ... do your submitting stuff ...
    
        submitted = true;
        submitButton.disabled = true;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this tiny Qt project with a project file like this: TEMPLATE =
I wrote this tiny code: #include <stdio.h> int main() { size_t temp; temp =
For example I now created a this tiny class: public static class FileSystemInfoComparers<T> where
I'm in a need to optimize this really tiny, but pesky function. unsigned umod(int
I'm trying to create tiny urls like this: site.com/abc123 goes to: site.com/index.php?token=abc123 but I
When I try to compile TOSSIM in tiny OS v-2.0.2 , this is the
I have a joomla project. In this the text editor is tiny mace. But
I've done some searching on this but can't find any sort of best practice
Im amazed that even after all this time (jQuery has been around since 2006
In index page I have: <head> ... <script type=text/javascript> T$('signup').onclick = function() { TINY.box.show('externalpage.html',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.