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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:35:43+00:00 2026-06-13T18:35:43+00:00

Hi I currently have a form on submission the following validation rule is checked:

  • 0

Hi I currently have a form on submission the following validation rule is checked:

<script language="JavaScript">
var frmvalidator  = new Validator("contactform");
frmvalidator.addValidation("message","req","Please enter a valid message."); 
</script>

    function Validator(frmname)
{
  this.formobj=document.forms[frmname];
    if(!this.formobj)
    {
      alert("Error: couldnot get Form object "+frmname);
        return;
    }
    if(this.formobj.onsubmit)
    {
     this.formobj.old_onsubmit = this.formobj.onsubmit;
     this.formobj.onsubmit=null;
    }
    else
    {
     this.formobj.old_onsubmit = null;
    }
    this.formobj._sfm_form_name=frmname;
    this.formobj.onsubmit=form_submit_handler;
    this.addValidation = add_validation;
    this.setAddnlValidationFunction=set_addnl_vfunction;
    this.clearAllValidations = clear_all_validations;
    this.disable_validations = false;//new
    document.error_disp_handler = new sfm_ErrorDisplayHandler();
    this.EnableOnPageErrorDisplay=validator_enable_OPED;
    this.EnableOnPageErrorDisplaySingleBox=validator_enable_OPED_SB;
    this.show_errors_together=true;
    this.EnableMsgsTogether=sfm_enable_show_msgs_together;
    document.set_focus_onerror=true;
    this.EnableFocusOnError=sfm_validator_enable_focus;

}

However I would like the error message to be displayed on the webpage rather than an alert, could someone please achieve this.

  • 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-13T18:35:45+00:00Added an answer on June 13, 2026 at 6:35 pm

    The tutorial you are using cites the form validator as http://www.javascript-coder.com/html-form/javascript-form-validation.phtml If you read that, specifically at the top of the second page you will see:

    Showing all the form validation errors together in a message box

    If you want to show all the error messages together, then just call
    the EnableMsgsTogether() function as shown below.

    frmvalidator.EnableMsgsTogether();

    The text which follows this provides further options for handling of error messages.

    You could perhaps try that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have this useful code that I found elsewhere on StackOverflow: form.DrawToBitmap(bmp, new
We have an AJAX contact form that currently on submission emails form data to
I currently have an enquiry submission form that can only be completed by registered
I have the following AJAX function: function ajaxDesignerBrandInfo() { var D = wrapFormValues('#designer-brand-form'); var
I have a php script which uses the following line to submit a form
currently I have following code: home.php <form name='myformname' id='myformid'> <input type='text' name='mytext1' value='abc'> <input
I currently have this code to prevent normal form submission and instead retrieve the
I currently have form that checks if a user has unsubmitted changes when they
I currently have a form with inputs and name attributes. I'm able to get
We currently have a form with the standard multi-select functionality of here are the

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.