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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:23:56+00:00 2026-06-11T07:23:56+00:00

I’ m using this code in my mobile application built with phonegap and jQuery

  • 0

I’ m using this code in my mobile application built with phonegap and jQuery I want to show pictures from server but I couldn’t integrate showPageLoadingMsg function and I ‘m not convinced that this type of Ajax call is useful and powerful. So I want really know what type of Ajax call I should use and how to use showPageLoadingMsg() function in my Android phone application .

server = "http://monserveur.com/upload.php";
var wid = $(window).width();
    if (server) {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange=function(){
            if(xmlhttp.readyState == 4){
        alert('ready');

                if (xmlhttp.status == 200  ) {
        alert('200');
                    document.getElementById('ousa').innerHTML = xmlhttp.responseText;
                }
                else {
                    document.getElementById('ousa').innerHTML = "Error retrieving pictures from server.";
                }
            }
        };
        xmlhttp.open("GET", server+"?wid="+wid, true);
        xmlhttp.send();
  • 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-11T07:23:58+00:00Added an answer on June 11, 2026 at 7:23 am

    Have you tried
    http://api.jquery.com/ajaxStart/

    http://api.jquery.com/ajaxStop/

    and couple them with a logic like found here

    http://www.w3schools.com/jquery/ajax_ajaxstart.asp

    $("div").ajaxStart(function(){
      $(this).html("<img src='demo_wait.gif' />");
    })ajaxStop(function(){
       $(this).empty();
    });
    

    This will basically add a listener if added to a self executing function or the dom ready logic of your script this listener will wait for anything ajax related to run.

    $.post()
    $.get()
    $.ajax()
    $.getJSON()
    $.postJSON()
    //any I missed?
    

    also I notice you mention phonegap, are you currently using the xhr.js they suggest using with AJAX requests? If not its something I suggest looking into, due to the same domain policy your AJAX may just be failing silently and very quickly. the xhr.js over comes the bounds of the same domain policy.

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

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I want to show the soap response to UIWebview.. my soap response is, <p><img
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.