Saturday, August 18, 2012

Javascript dynamic link issues?

There might be a duplicate of this (I\’ve tried checking questions on creating dynamic links but they reference a static link – I want this link to be hidden from the user). On testing the following code on the ww3 site:



<!DOCTYPE html>
<html>
<body>

<script type=\"text/javascript\">
document.write(\"<a href=&quot;www.google.com&quot;>Google</a>\");
</script>

</body>
</html>


I get:



http://www.w3schools.com/jsref/%22www.google.com%22


As the link address rather than www.google.com.


How do I correct this problem? And how do I make it so the link only appears after a set time? Note, this is a simplified version of the code for readability (the dynamic link will including two floating point variables assigned at the time the script is run).






Rating: 5 out of 5 based on 4 ratings



The post Javascript dynamic link issues? appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/javascript-dynamic-link-issues.html

No comments:

Post a Comment