AhmadWaqas
09-28-2011, 09:21 PM
OK .. Solved ... there was a typing mistake in the code :)
Today is my first day to start learning JavaScript. When i try to run the following code (copy-paste from a book), the browser gives me an error. Can you please tell me what's wrong with the following code:
<HTML>
<HEAD>
<SCRIPT LANGUAGE = "JavaScript">
function upperMe(){
document.converter.output.value = document.converter.input.value.toUpperCase()
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME = "converter">
<INPUT TYPE = "text" NAME = "input" VALUE="sample" onChange="upperMe()">
<INPUT TYPE = "text" NAME = "output" VALUE="sdf">
</FORM>
</BODY>
</HTML>
Thanks
Ahmad
Today is my first day to start learning JavaScript. When i try to run the following code (copy-paste from a book), the browser gives me an error. Can you please tell me what's wrong with the following code:
<HTML>
<HEAD>
<SCRIPT LANGUAGE = "JavaScript">
function upperMe(){
document.converter.output.value = document.converter.input.value.toUpperCase()
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME = "converter">
<INPUT TYPE = "text" NAME = "input" VALUE="sample" onChange="upperMe()">
<INPUT TYPE = "text" NAME = "output" VALUE="sdf">
</FORM>
</BODY>
</HTML>
Thanks
Ahmad