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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:54:50+00:00 2026-05-26T08:54:50+00:00

I have two functions to submit to different sets of data to the same

  • 0

I have two functions to submit to different sets of data to the same page. One function works fine, but the other doesn’t send the post data. Here is the code:

    function sortManufacturer() {
        showLoading();
        var orderList = '';
        orderedNodes = document.getElementById("sortable_list").getElementsByTagName("li");
            for (var i=0;i < orderedNodes.length;i++) {
                orderList += orderedNodes[i].getAttribute('recordid') + ',';
            }
$.post( 'save_sort_order.php', {type:'manufacturer', order: orderList},
        function() {
        hideLoading();
        $( ".saved" ).dialog( "open" );
        }
);}
    function editManufacturer() {
        showLoading();
        var fields = $("form#edit_manufacturer").serializeArray();
$.post( 'save_sort_order.php', {manActive: fields},
        function(data) {
        hideLoading();
        $( ".saved" ).dialog( "open" );
        }
);}

This doesn’t work either, no alert saying success and no alert throwing an error. Just reloads the page.:

    function editManufacturer() {
    $.ajax({
    type: "POST",
    url: "save_sort_order.php",
    data: "hey",
    success: function(){
        alert("success");
   }, 
   error: function(request, status, error) {
       var result = JSON.parse(request.responseText);
        alert(result.message);
   }
});
    }

No post data is being sent in Firebug under the Net panel. The first function works fine, the second is the one not being sent. If I put alert(“after”); after the $.post right before the closing } of the function, it works fine.

  • 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-26T08:54:51+00:00Added an answer on May 26, 2026 at 8:54 am

    I would start by adding an error handler to $.post, see the message it returns.
    Also look at firebug net panel to see the request and response

    http://getfirebug.com/network

    http://getfirebug.com/wiki/index.php/Net_Panel

    edit

    refer thread:-
    jQuery AJAX error handling

    change your ajax syntax for how its give over there. its more readable that way.

    also replace error handler with

    error: function(request, status, error) {
            var result = JSON.parse(request.responseText);
            alert(result.message);
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two functions that have different enough logic but pretty much the same
I have two functions whose underlying logic is the same but in one case
So I have two jquery functions that bassically do the same, but on 2
I have two functions in an ActionScript class, they are: private function loaderCompleteHandler(event:Event):void {
Say I have two functions that expect ...rest parameters private function a(...myParams):void { trace(myParams.length);
I have two Python functions, both of which take variable arguments in their function
I have a form. This form will submit data to 2 different pages. After
Hello guys i have cells in tableview, but there are two different UIButtons to
I have an accordion JQuery UI control that shows two different sets of fields.
I have a page with several forms. I am trying to submit one 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.