Javascript

Hey,
I am looking for a javascript that must do the following:
when a user enters a word in a form and presses submit, from that word
the first character moves one up in the alphabet, the second character moves
two up in the alphabet, the third character moves three up in the alphabet and so on.
example: when a user enters ‘b o a t’ and presses submit it shows ‘c q d t’—>
where ‘c’ is one place furhter than ‘b’ in the alphabet, ‘q’ is two places further than ‘o’
in the alphabet, ‘d’ is three places further than ‘a’ in the alphabet and ‘x’ is four places further than
‘t’ in the alphabet.

The script must be as simple as possible, I hope you guys can help me out with a script

Well I whipped this up real quick, it isn’t in a form, but instead it calls it from a prompt then writes it on the page.

I figured if you have the basic code it shouldn’t be too hard to put it in a form.

<SCRIPT LANGUAGE="Javascript">
<!--
myText = prompt("Type your Message In Here", "")
end = myText.length+1;
for (i=1; i<end; i++) {
	newChar = String.fromCharCode(myText.charCodeAt(i-1)+i);
	document.write(newChar);
}
-->
</SCRIPT>

Note: Keep in mind that if the code is close to the end of the alphabet and you add to it so it is longer than the alphabet you will get symbols and such instead of letters.