How to load data from another website using jquery mobile application for android ?

I want to build an app using jquery mobile and phonegap. My problem is When I try to load json data using $.ajax() method it works fine in local host but when i try this at live hosting it results nothing. Here is my code.

$.ajax({
        type: "GET",
        url: "http://rahultest.herobo.com/rbbank/login.php",
        crossDomain: true, 
        data: {id: 'rahul123', pswd:'xxxxx'},
        dataType:"json",

        success:function(data){
                if(data.status=="connected"){
                user_id=data.id;
                $.mobile.navigate("#menu");
                }
            else{
                alert("User ID and Password is incorrect");
                }

            },
        error: function(){alert("Could not connect");}
        });
});

Answers


Have you added the domain to Phonegaps whitelist?


Need Your Help

How to view pdf file that is saved in DB

vb.net pdf

This for download but I want only to display. Please help me