TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abraham Olatubosun
NA
471
113.1k
JAVASCRIPT NOT EXECUTING THE ELSE PART
Feb 17 2017 12:56 PM
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
Reply
Answers (
4
)
how to achieve functionality in java script
Is there any way to load a local Js file dynamically ?