Rookie needs help :(

wxdqz

New Member
OKay..To whom it may concern.

I have just started learning javascript about 3 hours ago. I am working on creating some form of a very basic and simple text
encrypter. just to give you a general idea of what i mean, heres some simple example variables.


// Variable Key

a="voy234fc2e";
b="wwstrewtde";
c="3hfyrjt756";
d="f38j5uGHTU";
e="fir843j5rl";
f="02dcsf4534";
g="71234ffsw4";
h="82bi8fd989";
i="384hWIonf0";
j="234h929r23";
k="34hbp9f92n";
l="bn2349hnf9";
m="23rnof9wn3";
n="2134bdf92n";
o="21398hndco";
p="23498hf09m";
q="34n9dDMNol";
r="34098nfwop";
s="395mnf0wmn";
t="32r098mcvw";
u="iof095mnvs";
v="9800952mff";
w="zzzeoijfpw";
x="oiwtrnsmvs";
y="standardkj";
z="12encryptw";


And here is what i have so far on my script...


<HTML>
<HEAD>
<script language="JavaScript">
function encode()
{
??????????????????????????????
}
</script>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<center><form name="inputtext">
<input type="text" size="40" value=http://www.webdeveloper.com/forum/archive/index.php/"Insert text to be encoded here">
</form></center>
<center><form name="submit">
<input type="button" value="Submit" onClick="encode()">
</form></center>

</BODY>
</HTML>


My problem is that i have no idea how to use functions to take the data from the input text field, turn every individual letter into a variable,
and have the script return all the variables encoded to the user.
Your help in this matter would be greatly appreciated. Thank you.




p.s.

heres one that i have that only i can use... If you make it write the variables and then view it as a webpage, it actually substitutes them for you and in effect encrypts your writing. Slow,
but sure ;)


<center><script laguage="javascript">
a="voy234fc2e";
b="wwstrewtde";
c="3hfyrjt756";
d="f38j5uGHTU";
e="fir843j5rl";
f="02dcsf4534";
g="71234ffsw4";
h="82bi8fd989";
i="384hWIonf0";
j="234h929r23";
k="34hbp9f92n";
l="bn2349hnf9";
m="23rnof9wn3";
n="2134bdf92n";
o="21398hndco";
p="23498hf09m";
q="34n9dDMNol";
r="34098nfwop";
s="395mnf0wmn";
t="32r098mcvw";
u="iof095mnvs";
v="9800952mff";
w="zzzeoijfpw";
x="oiwtrnsmvs";
y="standardkj";
z="12encryptw";
document.write(J);
document.write(a);
document.write(v);
document.write(a);
</script></center>

Thanks
 
Back
Top