...

View Full Version : Help: I need some help with javescript cookies?



sam007sam
07-02-2011, 03:54 PM
Hi,

I need some help with a javascript cookie please!

Problem: I am trying to put a search result url from another website on to my own website, but when other people visit my site and click the link it opens and says it has expired (because the cookie of that other site is not on their pc!). is their a way of getting that cookie from on my pc and making it so my website puts that cookie on my visitors pc?

I want to know if it is possible and if so... how?

many thanks,
sam007sam

Fugix
07-02-2011, 05:27 PM
I would first start by seeing how the cookie from the searchbar is set-up using this function


function getAllCookies() {
var cookies = document.cookie.replace(/ /g,"").split(";");
for (var i = 0; i < cookies.length; i++){
cookiePair = cookies[i].split("=");
document.write("["+cookiePair[0]+"] = ["+
cookiePair[1]+"]<br><br>");
}
}

this will display all of the cookies stored in your computer separated by a ";"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum