If i have an input like so:
<input type="text" id="textvalue" />
the following code will change its value:
$(document).ready(function() {
$('#textvalue').val("hello");
});
however the following will not work:
$(document).ready(function() {
var = "hello";
$('#textvalue').val(var);
});
Why does the second one not work? I need to be able to change the value of the textbox to the value of a variable