Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
148
rated 0 times [  153] [ 5]  / answers: 1 / hits: 32041  / 11 Years ago, thu, june 20, 2013, 12:00:00
if(typeof    (document.getElementById(courseId).value!==undefined) || document.getElementById(courseId).value!==null)
{
Courseid = document.getElementById(courseId).value;
}

More From » javascript

 Answers
59

rewrite it that way:



if(document.getElementById(courseId) && document.getElementById(courseId).value)
{
CourseId = document.getElementById(courseId).value;
}

[#77527] Tuesday, June 18, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gideons

Total Points: 197
Total Questions: 106
Total Answers: 108

Location: Moldova
Member since Sat, Jan 29, 2022
2 Years ago
gideons questions
Tue, Nov 9, 21, 00:00, 3 Years ago
Sat, Jan 2, 21, 00:00, 3 Years ago
Wed, Oct 28, 20, 00:00, 4 Years ago
Thu, May 21, 20, 00:00, 4 Years ago
;