Click here to Skip to main content
15,885,980 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I used nearly ten textbox on a page. In that ten i need to use five textbox and one combobox only used for my calculation. Three text box and one combox used to give a input. Two are shows the out put. When i enter input to textbox1 and combobox it shows out in textbox5 and texbox4. vice versa for textbox 2 and 3.
tamil=textbox1.text
english=textbox2.text
maths=textbox3.text
attendancemark(2,4,6,8,10)=combobox
avg=tamil+english+maths/3
textbox4.text=avg
textbox5.text=avg+combobox

VB
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
       If TextBox1.Text = "" Then
           TextBox1.Text = 0
       ElseIf TextBox2.Text = "" Then
           TextBox2.Text = 0
       ElseIf TextBox3.Text = "" Then
           TextBox3.Text = 0
       ElseIf DropDownList1.SelectedItem.Text = "" Then
           DropDownList1.SelectedItem.Text = 0
       End If
       a = TextBox1.Text
       b = TextBox2.Text
       c = TextBox3.Text
       d = DropDownList1.SelectedItem.Text
       sum = a + b + c / 3
       subtract = sum + d
       TextBox4.Text = sum
       TextBox5.Text = subtract
   End Sub

how can i do tis in java script.............



Please help me for this thank you.
S.Priyan
Posted
Updated 13-Apr-11 21:20pm
v5
Comments
Gopi9999 14-Apr-11 1:53am    
The Question is not clear?
Sandeep Mewara 14-Apr-11 1:59am    
Your question is not quite clear. Please rephrase and try to elaborate more on what is not working.
walterhevedeich 14-Apr-11 1:59am    
Is there an error? you need to post it.

1 solution

I presume your changed event is not firing.
You will need to handle text changed via JavaScript unless you set auto post back to true.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900