Forum Moderators: open
Can anyone tell me if this is possible and if yes the code I could use to do it?
Say a visitor comes to my website using the following URL: [mywebsite.com...]
I want to capture the query string "cid=1234" and store it in a session cookie, then when the visitor clicks on a link on my page (index.html) to an external site, ie. to [externalsite.com...] I want to append the query string stored in the cookie to the URL, so it will become [externalsite.com...]
Thanks,
Andrew
qstring=document.location.href.split('?')[1];
eg... if [sitename.com...]
qstring will be "for=1&top=7"
Dont use cookies so don't know how to store into cookies in JS and I'm sure you know how to add to a link.