Software Archive
Read-only legacy content

JAVASCRIPT doesn't work anymore ! Help !

henry_p_1
Beginner
899 Views

Hello everebody,

I work XDK 1878 on ubuntu.

Since the upgrade, the javascript code is no more executed ! Nothing at all !

I am fully bloked and can't do anything more on my development.

I try just a program with just an alert in javascript, it doesn't work !

The same in Firefox work perfectly.

Can somebody help  ?

Thanks...

 

 

0 Kudos
6 Replies
John_H_Intel2
Employee
899 Views

Do you have any errors in the emulator debug console?

Can you post your index.html file?

0 Kudos
henry_p_1
Beginner
899 Views

Hello..
This is the code I ask to execute (cordova project):

<!DOCTYPE html>
<html>
<head>
    <title>Blank Cordova App Project Template</title>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="css/app.css">
</head>
<body>
    <h1 class="align-center">A Blank Project Template</h1>
    <p class="align-center">
        To use this template as a starter app, start with init-app.js and app.js for your JavaScript code.
        See the README.md file for more details and the comments inside index.html, app.js and init-app.js.
    </p>
    <br>
    <p class="align-center">
        <input type="button" id="id_btnHello" value="Touch Me">
    </p>
    <script src="cordova.js" id="xdkJScordova_"></script>
    <script src="js/app.js"></script>           <!-- for your event code, see README and file comments for details -->
    <script src="js/init-app.js"></script>      <!-- for your init code, see README and file comments for details -->
    <script src="xdk/init-dev.js"></script>     <!-- normalizes device and document ready events, see file for details -->
</body>
    <script>
    alert ("hello");
    </script>
</html>


and this is the console output:

Console was cleared /home/henry/intel/XDK/xdk/components/client/emulator/ripple.js:25867

This same code work perfectly on Netbeans, and on all ohers EDI, but not with XDK.

I have the same problem with all my app since the update: nothing work anymore !

Thanks for ur help...

 

0 Kudos
Chris_P_Intel
Employee
899 Views

 

For me your code works fine.  However, I should note that your <script> should go _inside_ the body tag, not outside.

0 Kudos
henry_p_1
Beginner
899 Views

Hello...

Yes, you're right, but for this test is it not important.

I can't understand why this code won't work on XDK but work well on Netbeans.

I have tried to reinstall XDK but no way...

There is someting somewhere but I can't find the problem.

Is there a bug with the new version on XDK for ubuntu ?

That's what I think... Are you working on Windows ?

0 Kudos
henry_p_1
Beginner
899 Views

Hello...

Sorry for my english...

I have installed a new Windows and I can work with Javacript now.

Nobody from Intel answer here but I think there is a bug with the Ubuntu version.

Now all the code I write work perfectly when I don't use XDK. A simple geolocalisation doesn't work in XDK (I take an example from Intel and It doesn't work !). I have the problem since one month and I can't solve it.

All the code I writed before the new release doesn't work anymore in the wen release ! But It worked perfectly before the upgrade; I'am sure of this !

No I stop with XDK.

I need something more seriously that this...  Too much bug and too mutch incompatibilities. No help enought. Too much problem.

 

 

 


 

 

 

 

 

0 Kudos
John_H_Intel2
Employee
899 Views

I just create a new project from the geolocation template, didnt change anything in the code, opened the emulator, and it worked just as it should.

0 Kudos
Reply