Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    simple code not working

    hi guys, well im using this *snipppit* of code

    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?

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    why do you need the eval anyway? can't you simply use

    Code:
    var lol =hp_d11(unescape("SOME ENCRYPTED TEXT HERE"));
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •