- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I put a link in an event that I have to change the link . it works properly in emulator ios device but nothing works.
Example :
<a href="#page2" id="myLink" style="cursor: pointer;" onclick="save();"> click me </a>
<script>
function save()
{
if(condition)
{ document.getElementById('myLink').href='#page3'; }
else{document.getElementById('myLink').href='#page4';}
}
</script>
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you provide some screenshots? And if possible can you send me .zip file of your project so that I can provide you more detailed help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should think of the Emulate tab as a Cordova API simulator, not as a device emulator. It provides you with a convenient viewport to help you visualize the approximate layout of your app on various devices and itsimulates the core Cordova APIs to make it easier to debug apps that use those APIs. It does not simulate real devices nor does it simulate third-party Cordova plugin APIs. Getting your app to work in the Emulate tab is not a guarantee that it will work on a real device. Conversely, if things work on a real device but do not work in the Emulate tab, that is not an indication that your app is "broken." The only way to know with certainty that your app works as intended is to build it and install it on real devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend reviewing the following example using the onclick attribute.
Example
<!DOCTYPE html> <html> <body> <a id="demo" onclick="myFunction(this, 'red')">Click me to change my text color.</a> <script> function myFunction(elmnt,clr) { elmnt.style.color = clr; } </script> </body> </html>
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onclick_color2

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