Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does the encode() and scramble() functions work??

Status
Not open for further replies.

TheSaint99

Technical User
Apr 20, 2001
13
0
0
GB
Hey everybody,

I got a question about 2 javascript functions. The encode() and scramble() functions. How do these functions work and how can I use them.
I've seen the next examples:

{
u="examplestring";
var y1=0;
for (var i=0; i<8; i++) {
y1=encode(u,i,i+1,y1);
}

and

var y2=scramble(y1);

Anybody who can help me out?
Thnx in advance,

TheSaint
 
Thnx for your help, but I can't find the functions encode() and scramble(). So I still don't know what they mean, do or how I can use them... :(

TheSaint
 
Then I think you are mistaken about their existence --

Maybe you are thinking of escape() and unescape()

Those two are there, and basically what they do is take out any illegal characters and replace them with ANSI equivalents so that they can be passed via querystring to another web page -- unescape() 'decodes' the string --

Check devguru for further explanation.

good luck! :)
Paul Prewett
 
What link9 means is they take illegal characters and convert them to %xx format (where xx is the hex code for the character). For example, space will be converted to %20. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top