I am using jquery trying to retrieve the value of a text input but it is not working. can anyone see what I am doing wrong? http://jsfiddle.net/silvajeff/rJNLr/
<input id="mytest2" value="123"/>
<button id="findRow">Find Row</button>
$("#findRow").click(function() {
var theVal = $("#myTest2").val();
alert(theVal);
});
I apologize to everyone, but what I initially posted was just a typo when I was breaking the question down to simplify it. I will have to repost again, only this time I’ll put the unsimplified code here. I’ll leave this question here though and add a tag for case-sensitive because I still think these were valuable solutions to others who may potentially have issues.
You have used wrong id
myTest2which is not present usemytest2. Javascript is case sensitive so you need to take care.Live Demo