开发者

Jquery .attr passing & in link as &

On a joomla s开发者_运维技巧ite i am working on we use jquery to change a button that goes to our checkout page.

cartlink = "https://domain.co.uk/billing/cart.php?a=add&pid=67&domainoption=subdomain&sld=domain&tld=.co.uk&billingcycle=monthly&configoption[2]="+configoption2+"&configoption[3]="+configoption3+"&configoption[5]="+configoption5;

    jQuery("a#vps").attr('href', '' + cartlink +'');

However when someone clicks the link they are redirected to

https://domain.co.uk/billing/cart.phpa=add&pid=67&domainoption=subdomain&sld=domain&tld=.co.uk&billingcycle=monthly&configoption[2]=7&configoption[3]=9&configoption[5]=14

Notice that the & signs are sent as & . Our billing system doesnt pick up & in the url can anybody help

Regards Ross


The change is done server side as the code you posted works perfectly when fiddled, see http://jsfiddle.net/nzz3w/ . So it's not possible(atleast for me) to debug without knowing what's going on at server side...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜