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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:17:40+00:00 2026-06-06T12:17:40+00:00

I click the button and nothing happens. If I take out the validation code,

  • 0

I click the button and nothing happens. If I take out the validation code, then clicking the button works and it falls back to the PHP validation that I have implemented. I coded up the jquery validation first and it worked, then I coded up the PHP side. But then the jquery validation stopped working after the PHP side is okay.

Can someone help?

I tried adding

submitHandler: function(form) {
    form.submit();
}

like this:

submitHandler: function(form) {
    form.submit();
},
rules: {
    ...
}

But nothing happened.

Here is the relevant code, let me know if anything is unclear, thanks! I’ve been stuck on this for a while now.

if (isset($_POST['submit']))
{
    foreach($_POST as $key=>$value)
    {
        unset($_SESSION[$key]);
        $_SESSION[$key] = $value;
    }
    $errors = validation($job);
    if (count($errors) == 0)
    {
        sendEmail($job);
        sendEmailToApplicant($job);
    }
}

$output = "
<script src='http://code.jquery.com/jquery-latest.js'></script>
<script type='text/javascript' src='http://jzaefferer.github.com/jquery-validation/jquery.validate.js'></script>
<script type='text/javascript'>
jQuery.validator.setDefaults({
    debug: true,
    success: 'valid'
});
jQuery.validator.addMethod('phoneUS', function(phone_number, element) {
    phone_number = phone_number.replace(/\s+/g, ''); 
    return this.optional(element) || phone_number.length > 9 &&
        phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, 'Please specify a valid phone number');
</script>
<script>
    $(document).ready(function(){
        $('#applicationForm').validate({
            rules: {
                firstName: {
                    required: true,
                    rangelength: [2, 15]
                },
                lastName: { 
                    required: true,
                    rangelength: [2, 15]
                },
                email: {
                    required: true,
                    email: true
                },
                phone: {
                    required: true,
                    phoneUS: true
                },
                website: {
                    url: true
                }
            }
        });
    });
</script>


<form id='applicationForm' name='applicationForm' method='post' enctype='multipart/form-data'>

            ...

    <input id='submit' type='submit' name='submit' />
</form>";
  • 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-06T12:17:41+00:00Added an answer on June 6, 2026 at 12:17 pm

    really quick to try. not sure if this is the issue since I really didnt look too close, but why is there jQuery. in some actions if you dont have a jquery.noConflict.

    try changing those to just $ like this maybe:

    <script>
    $(document).ready(function(){
        $('#applicationForm').validate({
            rules: {
                firstName: {
                    required: true,
                    rangelength: [2, 15]
                },
                lastName: { 
                    required: true,
                    rangelength: [2, 15]
                },
                email: {
                    required: true,
                    email: true
                },
                phone: {
                    required: true,
                    phoneUS: true
                },
                website: {
                    url: true
                }
            }
        });
    
        $.validator.setDefaults({
            debug: true,
            success: 'valid'
        });
        $.validator.addMethod('phoneUS', function(phone_number, element) {
            phone_number = phone_number.replace(/\s+/g, ''); 
            return this.optional(element) || phone_number.length > 9 &&
                phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
        }, 'Please specify a valid phone number');
    });
    

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

Sidebar

Related Questions

What is wrong with my code? When I click the Show/Hide button nothing happens.
It only works once. At second button click, nothing occurs. If I change budilnik
ok, heres some sample code that demonstrates the problem. if i click the button
For some reason, the user that installs this, when they click the button, nothing
I just cannot get this to work! Whenever I click the button nothing happens.
In button click event I am writing this code.(code behind).I know button click event
So I have a dynamically loaded button that is called with the following .live('click')
I have this code : if you try to click on Button 2 or
I made a camera layout where two buttons existed.A click button and a share
I am trying to use some action when I click button in navigation controller.

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.