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

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -