- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all..;
I don't understand... A javascript alert("hello"); doesn't work ?
Is it absolutely necessary to use intel.xdk.notification.alert("hello") ?
Thanks for answers...
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not required or necessary to use any of the intel.xdk APIs. Alert messages are recommended to be declared in a JavaScript file or in a script tag. Where are you putting this code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sometimes I use "alert" to test. It works normally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello...
I write the javascript code between the <script> and </script> tag, generally in the head...
Do I need something special to run an alert ? I alse use <script src="intelxdk.js" type="text/javascript"></script> but that give no change...
When I use intel.xdk.notification.alert(...) I work just one time. Impossible to have two notifications one by one...
Can you give a example of index.html that works with a javascript alert("hello") code ?
Thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nothing special to run.
Try to call on click like this: <a href="" onclick="alert('something')">Touch here</a>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I try this (not working) on Xdk 2548:
(Javascript is not working, it is just an html5 code, worling out of XDK... what's wrong ?)
<!DOCTYPE html>
<html>
<head>
<title>Blank Standard HTML5 Web App Template</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<!-- see http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-dont-forget-the-viewport-meta-tag -->
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no">
<style>
/* following two viewport lines are equivalent to meta viewport statement above, needed for Windows */
/* see http://www.quirksmode.org/blog/archives/2014/05/html5_dev_conf.html and http://dev.w3.org/csswg/css-device-adapt/ */
@-ms-viewport { width: 100vw ; min-zoom: 100% ; zoom: 100% ; } @viewport { width: 100vw ; min-zoom: 100% zoom: 100% ; }
@-ms-viewport { user-zoom: fixed ; min-zoom: 100% ; } @viewport { user-zoom: fixed ; min-zoom: 100% ; }
</style>
<!-- Uncomment the following scripts if you convert your "Standard HTML5" project into a "Cordova" project. -->
<!-- <script src="cordova.js"></script> --> <!-- phantom library, needed for Cordova api calls, added during build -->
<!-- <script src="js/app.js"></script> --> <!-- recommended location of your JavaScript code relative to other JS files -->
<script src="intelxdk.js" type="text/javascript">
</script>
<script>
alert("gggggg");
<a href="" onclick="alert('something')">Touch here</a>
</script>
<!-- <script src="xdk/init-dev.js"></script> --> <!-- normalizes device and document ready events, see README for details -->
</head>
<body>
<p>Hello, Intel XDK!</p>
</body>
</html>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried it again again as just an html5app who work in any navigator :
I dont't have the prompt with XDK !
What's wrong ? I don't understand what how to do something with XDK ...
PLease an explication... Thanks...
<!DOCTYPE html>
<html>
<!--
* Please see the included README.md file for license terms and conditions.
-->
<head>
<title>Blank Standard HTML5 Web App Template</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<!-- see http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-dont-forget-the-viewport-meta-tag -->
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no">
<style>
/* following two viewport lines are equivalent to meta viewport statement above, needed for Windows */
/* see http://www.quirksmode.org/blog/archives/2014/05/html5_dev_conf.html and http://dev.w3.org/csswg/css-device-adapt/ */
@-ms-viewport { width: 100vw ; min-zoom: 100% ; zoom: 100% ; } @viewport { width: 100vw ; min-zoom: 100% zoom: 100% ; }
@-ms-viewport { user-zoom: fixed ; min-zoom: 100% ; } @viewport { user-zoom: fixed ; min-zoom: 100% ; }
</style>
<!-- Uncomment the following scripts if you convert your "Standard HTML5" project into a "Cordova" project. -->
<!-- <script src="cordova.js"></script> --> <!-- phantom library, needed for Cordova api calls, added during build -->
<!-- <script src="js/app.js"></script> --> <!-- recommended location of your JavaScript code relative to other JS files -->
<!-- <script src="xdk/init-dev.js"></script> --> <!-- normalizes device and document ready events, see README for details -->
</head>
<body>
<p>Hello, Intel XDK!</p>
<script>
alert("hello");
</script>
</body>
</html>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I created a new project and copy/paste your code. When I change to EMULATE tab, the message popup to me. It is working.
One sugestion: remove and reinstall the XDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK for your help.
I do that just now, try the code once again and come back with infos...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello I am back :-)
NO, sorry, after the complete reinstallation, il doesn't work.
All of my code work but impossible to have a popup in javascript...
I work with the Linux version 64 bits 2548.
In the past, I haven't this problem...
Does somebody use the same version ?
Thanks for help...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the fun, I have tried the EA.
Just the same problem... Maybe my PC... But javascript works on all navigators and on all other IDE !
Don't understand....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And finally, I've reinstalled XDK 2548 under windows and javascript is well running !
I'm not sure XDK for Linux is really safe...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good news. Maybe Linux has any kind of block for popup. I am using Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This seems to be an issue with the linux XDK.
I can reproduce this behaviour in XDK 2611. On a fresh linux system (Linux Mint 17.2, 64 bit) a simple alert() doesn't work in the emulator as described above, on a windows machine (Windows 8.1, 64 bit) it is working as expected.
Does anybody know how to fix this in linux XDK?
BTW I doesn't depend on enabling the cordova notification plugin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page