Can you tell me why it won't work or what will work.
This is what I want to do:
1. When I click on the submit button
2. Get the value inputed into the text box by the user
3. If the value in the text box is equal to "small"
4. alert("The value equals small");
This is my code

Why won't it work)
JavaScript
:
<script type="text/javascript">
var checkValue = document.getElementById('text').value;
function checkNameOfVideo()
{
if(checkValue == "small"){
alert("The value equal small");
}
}
</script>
HTML:
<form>
<label for="text"><input id="text" type="text" name="text" placeholder="GoPro Video Search" required></label>
<label><input id="submit" type="button" name="submit" tabindex="5" value="Search" onClick="checkNameOfVideo"></label>
</form>
Thanks Stuart