title: access denied to PHP from Blackberry 10 platform using phonegap - closed
body: <p>I have a problem with my phonegap project working on blackberry simulator. The version is 10.</p>
  
  <p>When I say phonegap, I haven't used any Cordova features yet but my simple javascript functions are not working in the first place.</p>
  
  <p>I have a button click which invokes a Javascript function. This JS function has a PHP as URL to retrieve data. Following is the function code -</p>
  
  <pre><code>function getAllDetails() {
    var myTable = '';
      myTable += '&lt;table id="myTable" cellspacing=0 cellpadding=2 border=1&gt;';
      myTable += "&lt;tr&gt;&lt;td&gt;&lt;b&gt;S.No.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Full Name&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;DOB&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Gender&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Address&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Image&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Video&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;";
      var url = "http://XXX.XXX.XX.XX:XX/PG_crud_experiment1/retrieve_all.php";
      $.getJSON(url, function(json) {
                  $.each(json, function(i, v) {
                      alert(v.id);
                              myTable += "&lt;tr&gt;&lt;td&gt;" + v.id + "&lt;/td&gt;&lt;td&gt;"
                                      + v.name + "&lt;/td&gt;&lt;td&gt;" + v.dob
                                      + "&lt;/td&gt;&lt;td&gt;" + v.address + "&lt;/td&gt;&lt;td&gt;"
                                      + v.image + "&lt;/td&gt;&lt;/tr&gt;";
                          });
  
                  $("#emp_tb1").html(myTable);
              });
  };
  </code></pre>
  
  <p>The problem here is my button click is entering the Javascript function but I am getting an error saying it cannot access the URL where my PHP file is placed. The PHP is actually running a SELECT SQL and retrieving values from a database.</p>
  
  <p>Below is a screenshot of my error on BB 10 simulator.</p>
  
  <p>Can anyone please tell me why this problem is coming up? Are there any pre-requisites/procedures to be followed before the device can run some Javascript functions or to access the PHP scripts on server?XXX</p>