My Code master,
Good day to you all, i have a JavaScript that test ASP.NET TextBox if it not empty,
if the TextBox is not empty it replace the value entered to it self else it should add the value entered to the existing value.
below is my code
- var T797 = parseInt(document.getElementById('<%=TextBox797.ClientID%>').value);
- if (T797 !="" || T797 >= 0)
- {
- document.getElementById('<%=TextBox797.ClientID%>').value = parseInt(document.getElementById('<%=TextBox651.ClientID%>').value);
- }else{
- document.getElementById('<%=TextBox797.ClientID%>').value = parseInt(document.getElementById('<%=TextBox797.ClientID%>').value) + parseInt(document.getElementById('<%=TextBox651.ClientID%>').value);
- }
please correct me where i am wrong
thank you