Note that there are some explanatory texts on larger screens.

plurals
  1. POonload method is not called in phonegap for windows phone 8
    primarykey
    data
    text
    <p>I am using phonegap to create application for html5,which loads html,js,css files from www folder.Attaching is my index.html. The problem is initappcache method which i am trying to called onload is not getting called.Please help me.</p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html manifest="spaiphone/test.manifest" &gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/&gt; &lt;meta name="format-detection" content="telephone=no" /&gt; &lt;meta name="format-detection" content="address=no" /&gt; &lt;script type="text/javascript"&gt; if(document.getElementById &amp;&amp; document.createElement){ document.write("&lt;style&gt;html {display: none;}&lt;/style&gt;&lt;script&gt;if( self == top ){document.documentElement.style.display = 'block';} else {top.location = self.location;}&lt;/sc"+"ript&gt;"); }else{ if (top != self){ top.location = self.location; } } &lt;/script&gt; &lt;style&gt; @-webkit-keyframes FadeIn{ 0%{ opacity:0; } 100%{ opacity:1; } } .splashscreen { position: fixed !important; position: absolute; top: 0px; right: 0px; left: 0px; bottom: 0px; background-color: #000000; } .splashscreen2{ text-align: center; } .splashscreen-image { -webkit-animation-name: FadeIn; -webkit-animation-timing-function: ease-in; -webkit-animation-duration: 1.5s; width:100%; height:100%; } &lt;/style&gt; &lt;link rel="stylesheet" type="text/css" href="spaiphone/jslib/tparty/cal/container.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="spaiphone/jslib/tparty/cal/calendar.css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="hidden" name="_konyAppProperties" value='' &gt; &lt;input type="hidden" name="_reqHeaders" value='{"Host":"localhost%3A8888","Connection":"keep-alive","Accept":"text%2Fhtml%2Capplication%2Fxhtml%2Bxml%2Capplication%2Fxml%3Bq%3D0.9%2C*%2F*%3Bq%3D0.8","User-Agent":"Mozilla%2F5.0+%28BB10%3B+Touch%29+AppleWebKit%2F537.1%2B+%28KHTML%2C+like+Gecko%29+Version%2F10.0.0.1337+Mobile+Safari%2F537.1%2B","Accept-Encoding":"gzip%2Cdeflate%2Csdch","Accept-Language":"en-US%2Cen%3Bq%3D0.8","Cookie":"JSESSIONID%3D1g8sg1u4glv3e","Cache-Control":"no-cache","Pragma":"no-cache"}' &gt; &lt;div id="splashScreen_main" class="splashscreen"&gt; &lt;div id="splashScreen" class="splashscreen2"&gt; &lt;img id="splashScreenImage" class="splashscreen-image" src="spaiphone/images/mvsplashscreenandroid.png" &gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- &lt;noscript style="position:absolute;background:white;"&gt;To use this site, first enable your browser;kqt;s JavaScript support and then refresh this page.&lt;/noscript&gt; --&gt; &lt;style&gt; #__JSDisabledErrorMsg{display:none;} &lt;/style&gt; &lt;noscript&gt; &lt;style&gt; #__JSDisabledErrorMsg{display:block;} &lt;/style&gt; &lt;/noscript&gt; &lt;div id="__JSDisabledErrorMsg" style="position:absolute;background:white;"&gt;To use this site, first enable your browser;kqt;s JavaScript support and then refresh this page.&lt;/div&gt; &lt;script type="text/javascript" &gt; // for css file : begin var orientation = window.orientation; var category = window.innerWidth; if(orientation) { category = Math.min(window.innerWidth, window.innerHeight); } if(orientation &amp;&amp; parseInt(category, 10) &gt; 250) { category = 360 } else if( orientation || parseInt(category, 10) &lt; 340) { category = 320; } else { category = 360; } if(window.devicePixelRatio &gt; 2) category = 440; alert("Category: "+category); var filename = "spaiphone/konyspabb" + category + ".css?ver=6.0.1"; // for css file : end // for splash image : begin var splImgNode=document.getElementById("splashScreenImage"); if(splImgNode){ splImgNode.src="spaiphone/images/mvsplashscreenandroid.png"; splImgNode.style.display="block"; } // for splash image : end var filename = "spaiphone/konyspaiphone.css"; var link = document.createElement("link"); link.setAttribute("rel", "stylesheet"); link.setAttribute("type", "text/css"); link.setAttribute("href", filename); document.getElementsByTagName("head")[0].appendChild(link); IndexJL = 0; function initappcache(){ $KG["version"] = "6.0.1"; alert("222222") test.appinit.initappcache(); } var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.src = "spaiphone/jslib/testinit.js"; alert("567567") script.onload = initappcache; head.appendChild(script); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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.
    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