[Javascript] Why is script line needed to change values

twlewis at SoftHome.net twlewis at SoftHome.net
Mon May 21 15:45:10 CDT 2007


I apologize, because this is a little off-topic from javascript.  I had
completed my javascript, which loads data to a textarea.  It would not
load the textarea.  I have a VBScript version that worked.  After much
careful elimination of code on the VBScript version, I found that the line
that was making the onclick work was the script statement.  I created a
chopped down version to test and play with.  In the script below, if I
remove the line
<script Language="VBScript" src="none"></script>,
the onclick no longer works.  I can paste it back in, and the button
changes as it is supposed to.  Can someone please explain this to me?
Thank you for your patience and explanation.
Tim


<html>
<head>
<script Language="VBScript" src="none"></script>

</head><body>
<form id=myform>
<input type="button" value="Click me!" id=Button1 name="button">

<input type="button" value="Change button 1 to monkey"
onclick="Button1.Value='monkey'">

</form>
</body>
</html>







More information about the Javascript mailing list