Post by texllmendo » Tue Mar 03, 2009 2:04 am

Hi, i have some problem with the url ampersand for product, when i use http://......//index.php?route=product/product&product_id=51 for a link in javascript doesnt work, the & or ampersand is missing any suggest? thanks

Newbie

Posts

Joined
Thu Feb 05, 2009 12:40 am

Post by nde » Tue Mar 03, 2009 10:16 am

URI encoding
& should be %26

Code: Select all

<script type="text/javascript">
var myaddr =
encodeURI("http://......//index.php?route=product/product&product_id=51");
document.write('<a href="' + myaddr + '">link<\/a>');
</script>
but where is the point in doing links with javascript?

nde
New member

Posts

Joined
Sat Jun 30, 2007 7:32 am
Who is online

Users browsing this forum: No registered users and 93 guests