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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:15:25+00:00 2026-06-02T19:15:25+00:00

I’m using colorbox to open a form (in a seperate html file) from a

  • 0

I’m using colorbox to open a form (in a seperate html file) from a link, carry out validation and submit the form to a php script. This is all working.

What I want to do now is for the result from the php script to appear in the colorbox. The script for the submit is as follows:

$.post('processForm.php', $("#chngPass").serialize(), function(data) {
    $('#FormContainer').html("<div id='message'></div>");  
    $('#message').html("<h2>Thank you for request</h2>")  
        .fadeIn(1500, function() {  
            $('#message').append(data);  
        });           
});

At one point I did get the message to appear but on the main page as colorbox closed. Now I can’t get anything to display on success.

I understand I need to stop the page refresh using ‘return false’ but i’ve tried that in various bits of the script so not sure where that should go.

Can anyone point me in the right direction please.

the ‘formContainer’ is a div containing the form in the form page, the intention is to replace the content with the message

Thanks

Update:
Thanks for the input so far. Still cant get the validate and submit script to work.

I’ve used a couple of methods now to submit the form, the latest one is this one:

    submitHandler: function() { 
        var url = "../2010/includes/scripts/php/memberFunctions.php"; //the form processing url
        $.ajax({
       type: "POST",
       url: url,
       data: $("#chngPass").serialize(), 
       success: function(data)
       {
       $("#chngPassWrapper").html(data); 
               }
    });

    return false; // avoid the actual submit of the form.

    }

I try this without the validate script and it works, the form submits and the form is then replaced in the colorbox with the results of the submit.

Putting back the validation script the form again submits but does not stop the form submit refreshing the page but the result of the submit appears in the top left corner of the refreshed page.

How can I use validate, use the post and stop the form from carrying out the submit and refreshing the page

Here’s the full script to put the above in context: [link] http://jsfiddle.net/longestdrive/fJELU/

Thanks for your help

  • 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-02T19:15:27+00:00Added an answer on June 2, 2026 at 7:15 pm

    Ha! Solved it

    I thought the validation script was working as it appeared to be on it’s own but one of the rules was incorrect which was then throwing the script out (thanks firebug!)

    The equalto rule should be equalTo

    Result!!

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

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.