Click here to Skip to main content
11,813,379 members (68,994 online)
Rate this: bad
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.
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.
Posted 13-Apr-11 19:49pm
Edited 13-Apr-11 21:20pm
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
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.

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

  Print Answers RSS
0 Abhinav S 270
1 CHill60 180
2 KrunalRohit 154
3 Palash Mondal_ 145
4 Sergey Alexandrovich Kryukov 140
0 OriginalGriff 3,877
1 KrunalRohit 2,496
2 CPallini 2,240
3 Maciej Los 2,205
4 ppolymorphe 1,750

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 14 Apr 2011
Copyright © CodeProject, 1999-2015
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