Click here to Skip to main content
15,442,472 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
Hi all

Txtbox a And Text box B

i giving values in A and b text box, its automatically added the data and Shows in Textbox c using Javascript.
How to assign the Javascript function.
Updated 31-Jul-12 19:27pm
Sebastian T Xavier 27-Jul-12 3:09am    
Is it so urgent?
AshishChaudha 27-Jul-12 3:12am    
Really Urgent..Then what you have tried so far??? Don't you URGENT word..
Sandeep Mewara 1-Aug-12 2:19am    
You have already marked the question solved. What's the point of updating question?

Try this

<script language="javascript" type="text/javascript"> 
function CalculateGPer()

        var Form = document.frmReg;
        var txt1= Form.txtBox1.value;
        var txt2= Form.txtBox2.value;
        var addition1= (Number(txt1)+Number(txt2));
        if(!isNaN(Per) && Per!=Infinity)
            Form.txtadd.value = addition1.toFixed(2);
        return CheckZero()

Share this answer
Jeeva G 27-Jul-12 3:23am    
thanks Ashish
CH Guravaiah 27-Jul-12 3:24am     CRLF
first find out the ID's of TextBoxes: var demo=document.getElementById("txtDemo1.ClientID"); var demo1=document.getElementById("txtDemo2.ClientID"); var demo2=document.getElementById("txtDemo3.ClientID"); var demo2= demo + demo1
Have you tried searching Google[^]?

Never feel lazy to use google..

Share this answer

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