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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:29:48+00:00 2026-06-15T12:29:48+00:00

Submission below bypasses javascript validation. Is it because onclick even or I’m missing something?

  • 0

Submission below bypasses javascript validation. Is it because onclick even or I’m missing something?

Thanks

FORM

<form name="myprofile" action="do_update" method="post" onsubmit="return validate_submission(this.name)">
   <input type="text" id="text_fullname" name="text_fullname" value="" maxlength="100" />
   <div id="submit_button" onclick="document.myprofile.submit()">SUBMIT</div>
</form>

JS

function validate_submission(formname)
{
    alert(formname); return false;
}
  • 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-15T12:29:49+00:00Added an answer on June 15, 2026 at 12:29 pm

    Add in an extra submission script, and call that from the div…

    <script>
        function validate_submission(formname)
        {
            var is_valid = false;
    
            if (formname == 'myprofile')
            {
                is_valid = true;
            }
    
            perform_submit(formname, is_valid);
        }
    
        function perform_submit(formname, is_valid)
        {
            if (is_valid === true)
            {
                document.myprofile.submit()
            }
            else
            {
                alert('Invalid');
            }
        }
    </script>
    <form name="myprofile" action="do_update" method="post" onsubmit="return validate_submission(this.name)">
       <input type="text" id="text_fullname" name="text_fullname" value="" maxlength="100" />
       <div id="submit_button" onclick="validate_submission('myprofile')">SUBMIT</div>
    </form>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to check passwords match before form submission in Javascript. My below code is
I have this AJAX submission form written with the jQuery validation plugin. It all
The issue is that at form submission through ajax the page still reloads, even
I'm trying to implement Ajax jQuery Form submission. The code I pasted below is
Among other text and visual aids on a form submission, post-validation, I'm coloring my
I have a trouble with my code below : <form name=form method=get action= autocomplete=off>
The code below works nicely. Each title in the MySQL table submission is printed
How to automate the submission of html form, with random text values using vbscript?
I am having some difficulties in making a form submission via a boxcomponent. I
I have a form which has a input textbox and submit button. On submission

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.