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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:17:19+00:00 2026-06-07T21:17:19+00:00

this is my form: <form name=Aform method=post action=test.php id=Aform> this is my script: var

  • 0

this is my form:

<form name="Aform" method="post" action="test.php" id="Aform">

this is my script:

var validator = $("#Aform").validate({
...
// form.submit();  <-- it works    
form.submit(function() {
$.post($(this).attr("action"), $(this).serialize(), function(data) {
    $.colorbox({html:data});
},
'html');
return false;
});  
// <-- it does not work
  • 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-07T21:17:20+00:00Added an answer on June 7, 2026 at 9:17 pm

    Have you looked at your JS console to see if you are generating any errors? Have you verified that your POST request is successful and returns data?

    It looks to me that this code only runs once the submit event has happened (making an assumption about the code not shown). Then you defined another event handler, but then that handler is never fired because the submit event does not happen again.

    Calling form.submit() fires the submit event, calling form.submit(function(){}) defines an event handler but does not fire the submit event.

    You could call form.submit() after you define the event handler, but defining an event handler and immediately invoking it is just jumping through an unnecessary hoop. You could do this instead:

    var validator = $("#Aform").validate({
    ...
    $.post($(this).attr("action"), $(this).serialize(), function(data) {
        $.colorbox({html:data});
    },
    'html');  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is something like this possible: <form method=post action=myphp.php name=myname target=another_html/iframe_name>??? I want the php
I've a form. <form action=inc/genxml.php method=post> <input id=nameTxt name=name type=text value=test/> <button id=nameSave class=left>Save</button>
and with this form: (select * from mp3 aktif = '0') <form name=form method=post>
I am testing a form. It looks like: <form accept-charset=UTF-8 action=/the_action method=post> <select id=id
Suppose I have a form like this: Name:<input type=text name=xxx id=name/> Type:<select> <option>xx</option> <option>xx</option>
I have a matrix of objects that contains data in this form: name A,2,name
I have this form: <tbody> <tr> <th>ID</th> <th>Name</th> <th>Birthdate</th> <th><input type=text autofocus=autofocus name=textinput1/></th> <th><input
I have a number of forms like this: <form class=some-name> <input type=hidden name=bill valueflower
After creating a new form, I usually perform this ritual: Change the name into
This is the fragment of code inserted with ajax: <form> <label for = task-name>Name</label>

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.