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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:42:02+00:00 2026-05-24T13:42:02+00:00

Can I use jQuery AJAX calls in PhoneGap to run a PHP file that

  • 0

Can I use jQuery AJAX calls in PhoneGap to run a PHP file that gets records from a database, or should I use JavaScript AAJAX?

  • 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-24T13:42:02+00:00Added an answer on May 24, 2026 at 1:42 pm

    You certainly can use jQuery Ajax functions in your PhoneGap applications. Here is a demo:

    — JavaScript in App —

    $('#some_page_id').bind('pageshow', function () {
        $.get('http://domain.com/path/to/script.php?get_param=value', function (data) {
            $(this).find('div[data-role="content"]').append(data);
        });
    });
    

    — PHP on Server —

    if (isset($_GET['get_param']) && $_GET['get_param'] == 'value') {
        $query = mysql_query("SELECT * FROM some_table WHERE some_col='something'", $db_handle);
        if (mysql_affected_rows() > 0) {
            while ($row = mysql_fetch_assoc($query)) {
                echo "<div>" . $row['some_other_col'] . "</div>";
            }
        } else {
            echo "No Data Found";
        }
    }
    

    The above example will query the PHP script on the server every time the ‘#some_page_id’ page is shown and append the data grabbed to the <div data-role="content"> tag. You can also use .html(data) instead of .append(data) to replace the HTML rather than add to it.

    UPDATE

    I found this in the jQuery Mobile documentation which gives some excellent information about making $.ajax() calls in PhoneGap apps: http://jquerymobile.com/demos/1.0/docs/pages/phonegap.html

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

Sidebar

Related Questions

Can I make use of jQuery AJAX API and make a synchronous calls?
I use the JQuery dialog and from the PHP I can build some add-in
Ey! Ok, i've come to understand that you can use AJAX calls to remote
I am starting to use the jquery $.ajax() but I can't get back what
How can I use jquery to remove a SPECIFIC div that has no children
I have a page with a menu that uses JQuery AJAX calls to populate
I use jQuery ajax calls to ASP.Net web services (ASMX files) to update the
I am moving from the PHP AJAX library xajax to jQuery AJAX. With xajax,
To create an image button that calls an action method you can use construction
I am creating a web application that uses JQuery's AJAX calls as it deals

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.