If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

As devnull has pointed out, the OP is trying to capture the value of the variable checkValue at the moment the script runs, on page load. At that moment the element "text" does not exist. Even if it did it would be "" (blank).

He has also missed out the brackets in onClick="checkNameOfVideo()"

Note also that "Small" or "sMaLL or "SMALL" is not the same as "small". The comparison should be with the input value .toLowerCase()

“A man ceases to be a beginner in any given science and becomes a master in that science when he has
learned that he is going to be a beginner all his life.” Robin G. Collingwood (English Philosopher, 1889-1943)

Last edited by Philip M; 11-15-2011 at 08:18 AM.

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.