|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do you Perform Event Procedures
<i><b>Originally posted by : KevinM (mullarkey@fs5.ee.umist.ac.uk)</b></i><br />All I want to do is add up a few text box values at the click of a button, but I keep getting an error.<br /><br />So how would I add up two boxes called MyInt1 and MyInt2 and display it as a Response.Write and in a textbox...<br /><br />Here is my Code..<br /><br /><SCRIPT LANGUAGE=vbscript><br />Sub cmdButton_OnClick()<br />'GET The TOTAL PRICE<br />Dim int1, int2, intTotalPrice<br /><br />int1=MyInt1.Value<br />int2=MyInt2.Value<br />intTotalPrice=int1+int2<br />End Sub<br /></SCRIPT><br /><br /><%Respons.Write intTotalPrice %><br /><br />All I get is an error 'intTotalPrice Object required' as it is empty!<br /><br />Many Thanks<br /><br />Kevin M<br /><br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : steve</b></i><br />You had the sub procedure on the client side and then trying to response.write something on the server side that would have calculated on the client side<br /><br /><SCRIPT runat=server LANGUAGE=vbscript><br />Sub Total()<br />'GET The TOTAL PRICE<br />Dim int1, int2, intTotalPrice<br />myint1 = 1<br />myint1 = 2<br /><br />int1 = myint1<br />int2 = myint2<br /><br />intTotalPrice=cint(int1) + cint(int2)<br />response.write intTotalPrice<br />End Sub<br />call Total()<br /></SCRIPT><br /><br />All I get is an error 'intTotalPrice Object required' as it is empty!<br /><br />Many Thanks<br /><br />Kevin M<br /><br />
|
|
#3
|
|||
|
|||
|
<i><b>Originally posted by : KevinM (mullarkey@fs5.ee.umist.ac.uk)</b></i><br />...
|
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > How do you Perform Event Procedures |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|