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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:03:43+00:00 2026-05-19T22:03:43+00:00

I am catching the form submission with jquery. This submit handler works in all

  • 0

I am catching the form submission with jquery.

This submit handler works in all browsers except internet explorer where it just does the submit.

How can I fix it?

$('#editForm').live('submit', function() {
        var data = [];
        var finalForm = $(this).serializeArray();
        var differences = 0;
        for (var i in initialForm) {
            if (!objectsAreSame(initialForm[i], finalForm[i])) {
                data[differences] = finalForm[i];
                differences++;
            }
        }
        console.log('diff: ', differences);
        if (differences > 0) {
            $.ajax({
                url: site_url + 'ajax/contact',
                type: 'POST',
                data: {
                    id: finalForm[0].value,
                    method: 'editContact',
                    data: JSON.stringify(data)
                },
                success: function(data) {
                    console.log(data);
                    $('#contact' + finalForm[0].value).hide("drop", {direction: 'up'}, 500, function() {
                        $('#contact' + finalForm[0].value).replaceWith(data);
                        $('#contact' + finalForm[0].value).show("drop", {direction: 'up'}, 500, function() {
                            $(document).trigger('close.facebox');
                        });
                    });
                    return false;
                }
            });
        }
        return false;
    });

looks like its not even wiring up the submit handler…
doing a straight off return false does nothing…

  • 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-19T22:03:44+00:00Added an answer on May 19, 2026 at 10:03 pm

    First of all your code is not neat enough to read; read this I4 ways to better jQuery coding

    Anyway below are some hints

    • Remove console.log() statements
    • Check where the return statement location
    • Use the IE debugger to catch the value(difference)
    • Use if(..){ }else{ } statement instead of if(...){ } alone

    And finally, I think it should be written this way; check where the first return statement is

    $('#editForm').live('submit', function() {
        var data = [];
        var finalForm = $(this).serializeArray();
        var differences = 0;
        for (var i in initialForm) {
            if (!objectsAreSame(initialForm[i], finalForm[i])) {
                data[differences] = finalForm[i];
                differences++;
            }
        }
        console.log('diff: ', differences);
        if (differences > 0) {
            $.ajax({
                url: site_url + 'ajax/contact',
                type: 'POST',
                data: {
                    id: finalForm[0].value,
                    method: 'editContact',
                    data: JSON.stringify(data)
                },
                success: function(data) {
                    console.log(data);
                    $('#contact' + finalForm[0].value).hide("drop", {direction: 'up'}, 500, function() {
                        $('#contact' + finalForm[0].value).replaceWith(data);
                        $('#contact' + finalForm[0].value).show("drop", {direction: 'up'}, 500, function() {
                            $(document).trigger('close.facebox');
                        });
                    });                   
                }
            });
            return false;
        }
        return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've looked at this before and found javascript that works for me with Google
I wonder whether someone may be able to help me please. I've put some
Coming from a Java background, I like it when I was warned that I
In order to add some sort of Caching to an Android application, I am
i installed php op code cache. php -v produces correct output, showing eaccelerator. but
When communicating with our REST webservice, an http response with status code of 304
is there a way to use PHP for database manipulation (i.e. a web application)
I have win 2008 R2 server with .net mvc project and other Ubuntu Linux
Zend_Cache can be configured to cache several types of output, including the results of
I have an external folder with html files and JS files. I have a

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.