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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:07:49+00:00 2026-06-09T18:07:49+00:00

Can’t get the GrabOldMessages() function to run after the html() runs. Below is my

  • 0

Can’t get the GrabOldMessages() function to run after the html() runs. Below is my code. Using jQuery version 1.7.2, I think I’m calling it back correctly, am I overlooking something? Please help me find my mistake. If you need me to provide anymore info, just let me know. Thank you for taking the time to help me.

//GRAB NEW MESSAGES
function GrabNewMessages(){
    var doIB = encodeURIComponent("GET_DATA"); 
    $.ajax({ 
        type: 'POST', url: 'app/pull_data_files/inbox_NM_array.php',  dataType: "json",  data: { getInbox: doIB }, 
        success: function(inbox_NM_data) {                 
          if(inbox_NM_data[1] == 'true'){$('#inbox_NMlist_html').html(inbox_NM_data[0], function(){ GrabOldMessages(); });}
          else{alert("Didn't work");}
        }  
    }); 
return false;

}

//GRAB OLD MESSAGES
function GrabOldMessages(){

    var doIB = encodeURIComponent("GET_DATA"); 
    $.ajax({ 
        type: 'POST', url: 'app/pull_data_files/inbox_OM_array.php',  dataType: "json",  data: { getInbox: doIB }, 
        success: function(inbox_OM_data) {                 
          if(inbox_OM_data[1] == 'true'){$('#inbox_OMlist_html').html(inbox_OM_data[0], function(){GoToInbox();});}
          else{alert("Didn't work");}

        }  
   }); 
return false;
}
  • 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-09T18:07:50+00:00Added an answer on June 9, 2026 at 6:07 pm

    You are specifying a second parameter in html() which takes either none or one.

    Try using this success version instead for your first code-snippet.

     success: function(inbox_NM_data) {
        if (inbox_NM_data[1] == 'true') {
            $('#inbox_NMlist_html').html(inbox_NM_data[0]);
            GrabOldMessages();
        }
        else {
            alert("Didn't work");
        }
    }
    

    And this for the second code-snippet:

    success: function(inbox_OM_data) {
        if (inbox_OM_data[1] == 'true') {
            $('#inbox_OMlist_html').html(inbox_OM_data[0]);
            GoToInbox();
        }
        else {
            alert("Didn't work");
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can i get the source code for a WAMP stack installer somewhere? Any help
Can I change the field public virtual ClassOne ClassOne { get; set; } to
Can I authenticate with just Google account username and password instead of using OAuth?
Can any one tell, how to get the result of LINQ query contains group
Can someone thoroughly explain the last line of the following code: def myMethod(self): #
Can I be sure about the order in a Python dictionary? The function op.GetTangent(id)
I have a jquery bug and I've been looking for hours now, I can't
Can PHP PDO extension bind nested objects automatically ? I mean using foreign key
Can I run this in a Windows command prompt like I can run it

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.