...

View Full Version : simple code not working



blueman378
05-07-2008, 05:36 AM
hi guys, well im using this *snipppit* of code


function hp_d11(s){
var o="",
ar=new Array(),
os="",ic=0;
for(i=0;i<s.length;i++){
c=s.charCodeAt(i);
if(c<128)c=c^2;os+=String.fromCharCode(c);
if(os.length>80){
ar[ic++]=os;os=""
}
}
o=ar.join("")+os;
return o}

var lol = eval(hp_d11(unescape("SOME ENCRYPTED TEXT HERE")));

document.getElementById("preview_innerhtml2").innerHTML = lol;
however where it should show the outputt of the eval it simply says undefined, any ideas?

shyam
05-07-2008, 06:26 AM
why do you need the eval anyway? can't you simply use


var lol =hp_d11(unescape("SOME ENCRYPTED TEXT HERE"));



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum