By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

Populate Textbox, VBSCRIPT

P: 4
Hi. I'm sorry if this is a stupid question but I'm having problems populating a textbox when a button is clicked.

Example:

[HTML]<HTML>
<HEAD>
<script language="vbscript">
Sub btnCalculate_OnClick()
form.txtTotal.value = '9'
End Sub
</script>
</HEAD>

<BODY>

<form name="frmCalculation">
<input type="text" name="txtTotal">
<input type="button" name="btnCalculate" value="Calculate">
</form>

</BODY>
</HTML>[/HTML]
When I click the button, nothing happens. What is the proper procedure for populating a textbox when using a script? Thank you in advance.
May 4 '07 #1
Share this Question
Share on Google+
1 Reply


P: 13
Hi,

i think you should be showing

frmCalculation.txtTotal.value = '9'

not 100% sure but that could be the cause. :)

Hi. I'm sorry if this is a stupid question but I'm having problems populating a textbox when a button is clicked.

Example:

[HTML]<HTML>
<HEAD>
<script language="vbscript">
Sub btnCalculate_OnClick()
form.txtTotal.value = '9'
End Sub
</script>
</HEAD>

<BODY>

<form name="frmCalculation">
<input type="text" name="txtTotal">
<input type="button" name="btnCalculate" value="Calculate">
</form>

</BODY>
</HTML>[/HTML]
When I click the button, nothing happens. What is the proper procedure for populating a textbox when using a script? Thank you in advance.
May 4 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.