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 8332539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:45:12+00:00 2026-06-09T02:45:12+00:00

The HTML is: <input name=submit type=submit class=button value=Click Here tabindex=13 onclick=return ValidateForm(); /> The

  • 0

The HTML is:

<input name="submit"
       type="submit"
       class="button"
       value="Click Here"
       tabindex="13"
       onclick="return ValidateForm();" />

The ValidateForm() function has all the usual form validating code.
The other function I can’t get to run (except by itself it works fine..example

<input name="submit"
       type="submit"
       class="button"
       value="Click Here"
       tabindex="13"
       onclick="disDelay(this);" />

I tried putting them both after the onclick…example

<input name="submit"
       type="submit"
       class="button"
       value="Click Here"
       tabindex="13"
       onclick="return ValidateForm(); disDelay(this);" />

I also tried putting one the code in the same function with no success.

The function disDelay() is

function disDelay(obj){
    obj.setAttribute('disabled','disabled');
    setTimeout(function(){obj.removeAttribute('disabled')},10000);
}

It is to be used as a delay to keep the form from getting duplicate submissions from multiple clicks. The delay is at 10 seconds right now just for testing purposes.
I need the validation and delay to work together.

  • 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-06-09T02:45:13+00:00Added an answer on June 9, 2026 at 2:45 am

    Returning the value of the first function terminates the click handler. Essentially, this is what you’re doing in your attempt to combine:

    <input name="submit" type="submit" class="button" 
           value="Click Here" tabindex="13" 
           onclick="return submit_Click(this);" />
    
    <script type="text/javascript">
        function submit_Click(sender) {
            return ValidateForm(); 
            disDelay(sender); // !!! This call is unreachable !!!
        }
    </script>
    

    Here is one simple option to correct it:

    <input name="submit" type="submit" class="button" 
           value="Click Here" tabindex="13" 
           onclick="return submit_Click(this);" />
    
    <script type="text/javascript">
        function submit_Click(sender) {
            var r = ValidateForm(); 
            disDelay(sender); // It seems like you would only want to call this
                              // function if the form is validate, so there should
                              // probably be an if-statement surrounding it. However,
                              // I'll leave that up to you.
            return r;
        }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HTML <form id=contact_form action=# name= method=POST> <label for=name>NAME</label> <input type=text name=name id=name class=contact_form_input />
I have the following bit of HTML: <label>First Name</label><input name=Question62 type=text value= /> Unfortunately
I have a page with File html input field and a Submit button as
here is an example of a simple ajax submit form: $('#submit').click(function () { var
I have a form with different html input fields... 1) <input type=text> 2) <textarea></textarea>
I want to use the placeholder attribute for HTML input[type=text] elements such that the
I've 2 asp listbox controls and an html input button, and using js i
Is there a simple way to upload a single file through HTML input type
I am trying to add an type upon clicking the button. Here is my
Is there a way to accessing html elements under a particular class name in

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.