Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

help in javascript


ghost's Avatar
0 0

can someone please explain to me what this piece of code does?

<script> function handleReg() {location.href="http://friends.walla.com/?w=/@en.signup&vars="+vars;} var acookie=document.cookie.split(";"); function GetCookie(name) {var i,cc,cv="",p; for (i=0;(i<acookie.length);i++) {cc=acookie[i].split("=");if ((p=cc[0].lastIndexOf(" "))>=0) cc[0]=cc[0].substring(p+1);if (name==cc[0]) cv=cc[1];} return(cv);} var vars=location.search.substring(1).split("&").join(","); var nick=GetCookie("nick"); var K=GetCookie("K"); document.mainform.username.value=GetCookie("nick"); document.mainform.username.focus(); if (nick!="") if (K!="") {document.all("gSignIn").style.display="none";document.all("gSignOut").style.display="block"; document.all("gCurNick").innerText=nick;} </script>

thank you :D im still learning js, so as for now im rather noobie at it ;)


Uber0n's Avatar
Member
0 0

Well it manipulates your cookies at friends.walla.com :D

Nah seriously, I don't really know since I don't know what all the cookie values stand for… :p