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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:09:11+00:00 2026-06-05T12:09:11+00:00

I am trying to make all the forms in the page to do something

  • 0

I am trying to make all the forms in the page to do something when they are submitted and to prevent their default behavior using this jQuery code:

$("form").not("#loginf").submit(function (){
    event.preventDefault();
    var inputs = $(this).serialize();
    $.ajax({
      url: "pages/"+page+".php",
      type: "POST",  
      data: inputs+'&action='+param,
      cache: false
    }).done(function( html ) {
        update(html);
        rs();
    }).fail(function (){
        window.location = "/CMS/";
    });
});

and this html form (just 1 of them):

<form method="POST" name="cpass">
    <span class="brow"><span class="label">סיסמא ישנה:</span><input type="password" name="oldp" /></span>
    <span class="brow"><span class="label">סיסמא חדשה:</span><input type="password" name="newp" /></span>
    <span class="brow"><span class="label">וידוא סיסמא:</span><input type="password" name="rnewp" /></span>
    <span class="brow"><input type="submit" name="cpasssub" value="שנה סיסמא"/></span>
</form>

The problam is that the jQuery function doesn’t even get executed (i checked by placing an alert there).

What is wrong here?

  • 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-05T12:09:13+00:00Added an answer on June 5, 2026 at 12:09 pm

    You missed event arguments within submit

      $("form").not("#loginf").submit(function (event){
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make something that will enable all controls if a SubString
I have this test page: http://www.problemio.com/problems/problem.php?problem_id=305 I am trying to make the form towards
I'm trying to make all rows have a hover background except the header row.
I am trying to make sure all my inputs are secure, protecting the server
I am trying to make a catch-all proxy that takes any selector with any
I'm trying to make my app publish to all my friend's walls. From what
I am trying to make a regex that matches all occurrences of words that
I'm trying to make a simple php script to find all src attributes from
I am trying to make a firefox extension which looks at all the new
I'm trying to make a Google Maps widget for my website but all of

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.