Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-07-2008, 05:36 AM   PM User | #1
blueman378
New Coder

 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
blueman378 is an unknown quantity at this point
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?
blueman378 is offline   Reply With Quote
Old 05-07-2008, 06:26 AM   PM User | #2
shyam
Senior Coder

 
shyam's Avatar
 
Join Date: Jul 2005
Posts: 1,563
Thanks: 2
Thanked 163 Times in 160 Posts
shyam will become famous soon enough
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
shyam is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:43 PM.


Advertisement
Log in to turn off these ads.