gloeg Posted March 15, 2009 Share Posted March 15, 2009 is this a good way to get and make cookies function setCookie(stof,tekst){datum=new Date();datum.setFullYear(datum.getFullYear()+20);string=stof+"="+tekst+"; "+"expires="+datum.toGMTString()+"; path=/"document.cookie=string}function getCookie(stof){waarde=""if (document.cookie.length>0) { beginnummer=document.cookie.indexOf(stof+"="); if (beginnummer !=-1) { eindnummer=document.cookie.indexOf(";",beginnummer) if (eindnummer==-1) { eindnummer=document.cookie.length()+1 } waarde=document.cookie.substring(beginnummer,eindnummer) alert(waarde) } }return waarde} Link to comment Share on other sites More sharing options...
justsomeguy Posted March 16, 2009 Share Posted March 16, 2009 That's sort of the only way, as far as I know. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.