Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java script
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
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 13-Apr-11 20:49pm
Edited 13-Apr-11 22:20pm
v5
Comments
Gopi9999 at 14-Apr-11 1:53am
   
The Question is not clear?
Sandeep Mewara at 14-Apr-11 1:59am
   
Your question is not quite clear. Please rephrase and try to elaborate more on what is not working.
walterhevedeich at 14-Apr-11 1:59am
   
Is there an error? you need to post it.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 220
2 DamithSL 190
3 Raul Iloc 185
4 Richard MacCutchan 175
0 OriginalGriff 5,130
1 DamithSL 4,197
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 14 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100