Note that there are some explanatory texts on larger screens.

plurals
  1. POshow 'loading' text/icon while external page gets loaded in phonegap, html5
    primarykey
    data
    text
    <p>In a phonegap-android application i want to open an external link within the application.</p> <p>For this i used a plugin <a href="https://github.com/phonegap/phonegap-plugins/tree/master/Android" rel="nofollow">childBrowser</a> and it works fine.</p> <p>But the external link is taking time to load for which i want to <strong><em>show a wait/loading message.</em></strong></p> <p>I also tried to open the external link through ajax-call, updating the div with the response page. and until reponse is not received i am showing a <em>loading message</em> but the problem with this approach is that page loses its styles and other structure.</p> <p>I guess this is because i am putting entire external page inside the div tag which cannot render the entire page as the browser can do it. </p> <p>Code snippet looks like-</p> <pre><code>&lt;script type="text/javascript"&gt; function loadPage(url) { var xmlhttp = new XMLHttpRequest(); // Callback function when XMLHttpRequest is ready xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState === 4){ if (xmlhttp.status === 200) { document.getElementById('container').innerHTML = xmlhttp.responseText; } } }; xmlhttp.open("GET", url , true); xmlhttp.send(); } &lt;/script&gt; </code></pre> <p>How can i achieve this, can I override childBrowser? </p> <p>Also</p> <p>if i want to open the page in applications' web view then how can i achieve the same for web-view.</p> <p><strong>EDIT</strong>: <em>As per <a href="http://en.wikipedia.org/wiki/Same_origin_policy" rel="nofollow">Same origin policy</a> one cannot call to a outside domain using xhr request. Okay understood. i checked in browser and got expected error: 'XMLHttpRequest cannot load'</em></p> <p><em><strong>But then how does it shows/opens the url in mobile?</em></strong></p> <p>Ofcourse the page is not fully functional and thats my original issue.</p> <p>i would post this as a separate question, but its related to my original question</p> <p>Thanx.</p> <p>Any hints/suggestions would be great.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload