Forum Moderators: open

Message Too Old, No Replies

javascript link not working in IE6

IE6 javascript link not working

         

rsmarsha

1:55 pm on Aug 15, 2007 (gmt 0)

10+ Year Member



I have the following link which works fine in everything apart from IE6. In most browsers it takes a value from an adjacent text box and passes that along with the rest of the link to the intended page.

In IE6 it does nothing.


<a href="javascript://" onClick="top.location='cart.php?xCmd=add&position=<?php echo $cr['productID'];?>&xFwd=customer.php?xCmd=wlshow&xProd=<?php echo $cr['productID'];?>&qty<?php echo $cr['productID'];?>='+document.getElementById('qty<?php echo $cr['productID'];?>').value" />

Any ideas? help urgently needed and thanks in advance. :)

rsmarsha

2:56 pm on Aug 15, 2007 (gmt 0)

10+ Year Member



Fixed it.

The new link is


<a href="javascript&#058;location.replace('cart.php?xCmd=add&position=<?php echo $cr['productID'];?>&xFwd=customer.php?xCmd=wlshow&xProd=<?php echo $cr['productID'];?>&qty<?php echo $cr['productID'];?>='+document.getElementById('qty<?php echo $cr['productID'];?>').value)" />

Trace

3:01 pm on Aug 15, 2007 (gmt 0)

10+ Year Member



<a href="#" onClick="window.location.href='cart.php?xCmd=add&position=<?php echo $cr['productID'];?>&xFwd=customer.php?xCmd=wlshow&xProd=<?php echo $cr['productID'];?>&qty<?php echo $cr['productID'];?>='+document.getElementById('qty<?php echo $cr['productID'];?>').value; return false;" />

That should give you this;
cart.php?xCmd=add&position=AAA&xFwd=customer.php?xCmd=wlshow&xProd=AAA&qty=AAA

The 2 question marks are going to cause you some headaches.

Edit: nm, guess you got it.

[edited by: Trace at 3:01 pm (utc) on Aug. 15, 2007]