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

  • Home
  • SEARCH
  • 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 664149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:34:04+00:00 2026-05-13T23:34:04+00:00

So I have a validation script I made a while ago. I can pass

  • 0

So I have a validation script I made a while ago. I can pass the script “this” as the form identifier to get it going on the right element (with(this)). But what if I want to call this validation function from a place other than the form itself, let’s say, in an another request that wants to know if the form is valid?

   function validate_form(thisform) {
        with (thisform) {
            validate_fullName(fullName);
            validate_email(email);
            if (isName&&isEmail) {return true;};
            return false;
        };
    };

So basically I want to call this function in another function to check if the form is valid or not:

if(validate_form(WHATDOIPUTHERE?)){ // STUFF; };

Thank you so much!!

  • 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-13T23:34:05+00:00Added an answer on May 13, 2026 at 11:34 pm

    you can use document.getElementById("formId") (or $("#formId") in jquery):

    if(validate_form(document.getElementById("formId"))){ // STUFF; };
    

    For this to work you need to set the id of the form, like so:

    <form id="formId" method="post" action="...">
    
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have fully working validation script my problem is that i can't get custom
I have written the following contact form validation script. How can I validate a
Ok, I have a validation script that checks everything on the form - but
I have a big validation JS script. I want to put this script to
I am writing a basic jQuery form validation script and I have something like
I have this script uses regular expressions to check that a form field contains
I have a HTML script like this: <form id=no1> <input id=title type=text /> <input
I am creating a form validation script and I have check box's on a
I have a form validation script that is unfortunately returning the Stack overflow at
I have modified unobtrusive validation script to replace error messages with qtips. To do

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.