This is a migrated thread and some comments may be shown as answers.

Phonegap not loading javascript

1 Answer 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 29 Aug 2012, 03:40 PM
I switched my app over to Kendo from Jquery Mobile. It works on the desktop but when I compile it for IOS or Android the javascript doesn't load at all. Any clue what could be causing this?

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 30 Aug 2012, 03:11 AM
Nevermind I had forgotten to add:

        <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
        <script type="text/javascript">
            function onBodyLoad()
            {                    
                document.addEventListener("deviceready", onDeviceReady, false);
            }


            function onDeviceReady()
            {
                // do your thing!
            }            
        </script>        
    </head>
    <body onload="onBodyLoad()">

Once I added that it compiled fine for all platforms.
Tags
General Discussions
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or