Q:

ajax call working in browser but not in emulater

i am making a phone gap application .in a html file i need a ajax
  call,its working well in browser and showing me all results but
  whenever i access my application in emu later ajax calls error
  function rather of success function.i don`t know why its happening

what i have already tried is-:
 i have added $.mobile.allowCrossDomainPages = true; line 
i have replaced theme and jquery files .
i configured a new project as phonegap project and copy paste file into this ,but still same problem is coming
i am facing problem from few days ,no solutions found,please help me,i am stuck.
$
            .ajax({
                url : ' http://app.mydomainname.com/takeaway/find',
                data : {
                    location : "/takeaway/find/home-delivery-in-"
                            + $("#indexsearch").val()
                },
                type : 'POST',
                dataType : 'json',
                crossDomain : true,

                success : function searchSuccess(data, status) {
                    alert("sdfs");
                    $("#list").empty();
                    $
                            .each(
                                    data,
                                    function(i, item) {

                                        content = '<li data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="false" data-iconpos="right" data-theme="c" class="portfolio-item ui-btn ui-btn-icon-right ui-li ui-li-has-alt ui-li-has-thumb ui-first-child ui-btn-up-c ui-corner-none">'
                                                + data[i].name
                                                + ' <a href="#" onclick="getdata('
                                                + data[i].id
                                                + ');" <h6 class="ui-li-heading">'
                                                + data[i].phone_no
                                                + '</h6><p</a></div></div>';
                                        $(content).appendTo("#list");
                                    });

                },
                error : function searchError(data, error) {
                    alert("in error", error);
                }
            });
}

A:

<uses-permission android:name="android.permission.INTERNET" /> 
add this line in your manifest file 

