append url with a session id jquery -
i have static session id i'm using , need add url when clicked, can't seem right. if go http://www.mysite.com/test.php redirected, session id xyx needs added, correct url hit page http://www.mysite.com/test.php?sessionid=xyx
<a href="http://www.mysite.com/test.php" class="foo">link here</a> $('.foo').click(function(){ (this).append(?sessionid=xyx');' });
i know wrong, documentation ive found more complex needs. thanks!
this should add session id , send user new url, use e.preventdefault
stop system using normal event, add session id url , send browser there:
<a href="http://www.mysite.com/test.php" class="foo">link here</a> $('.foo').click(function(e) { e.preventdefault(); window.location = $(this).attr('href') + '?sessionid=xyx'; });
Comments
Post a Comment