Hi there,

I am trying to implement my script into Wordpress but for some reasons it just doesn't simply work. And whenever I try to test it online, it doesn't work either... Only when I'm offline does it work.

Here is the script :








<script type="text/javascript">








function copyit(theField) {


var tempval=eval("document."+theField)


tempval.focus()


tempval.select()


therange=tempval.createTextRange()


therange.execCommand("Copy")


}





function results()

{

var behavior="form";

var text=document.csrAlpha.csrresult2.value;



var uccvt=text.toLowerCase();



var Words=new Array;

Words["a"]="Alpha";

Words["b"]

="Bravo";

Words["c"]="Charlie";

Words["d"]="Delta";

Words["e"]="Echo";

Words

["f"]="Foxtrot";

Words["g"]="Golf";

Words["h"]="Hotel";

Words["i"]="India";



Words["j"]="Juliet";

Words["k"]="Kilo";

Words["l"]="Lima";

Words["m"]="Mike";



Words["n"]="November";

Words["o"]="Oscar";

Words["p"]="Papa";

Words["q"]="Quebec";



Words["r"]="Romeo";

Words["s"]="Sierra";

Words["t"]="Tango";

Words["u"]="Uniform";



Words["v"]="Victor";

Words["w"]="Whiskey";

Words["x"]="X-Ray";

Words["y"]="Yankee";



Words["z"]="Zulu";

Words["0"]="Zero";

Words["1"]="One";

Words["2"]="Two";



Words["3"]="Three";

Words["4"]="Four";

Words["5"]="Five";

Words["6"]="Six";



Words["7"]="Seven";

Words["8"]="Eight";

Words["9"]="Niner";

Words["-"]="Dash";



Words["."]="Dot";

Words[" "]="[space]";

var trans="";

var regExp=/[\!@#$%^&*(),=";:

\/]/;

var stringCheck=regExp.exec(uccvt);



if(!stringCheck)

{

if

(uccvt.length > 0)

{

for(var i=0;i < uccvt.length;i++)



{

var thisChar=uccvt.charAt(i);

trans

+= Words[thisChar] + " ";

}

}

else

{



trans +="Please write something.";

}

}

else

{



trans +="You entered invalid characters. Remove them and try again.";

}





document.csrAlpha.csrresult.value=trans;



}



//-->

</script>












<form name="csrAlpha">








<script type="text/javascript">



</script>





<input type="text" name="csrresult2" size="70" maxlength="120">










<input type="button" value="Translate" onclick="results();">






<input type="Reset" value="Clear Values">







<textarea name="csrresult" cols="20" rows="10" value="">
</textarea>

Any ideas of what's going on?

Thanks!

Louis