I'm trying to work out if values have changed through javascript. Essentially doing a check on a textbox to see if the value changes.
However, when I put the value in to a variable it comes back as undefined. Clearly i'm doing something silly wrong but my tired head can't work it out.
Here's what i'm doing:
<script>
var stableCount;
$(document).ready(function () {
$('.div-updated').hide();
$("#responsecontainer").load("CyberTable.aspx");
stableCount = $(".rowcount").val();
var refreshId = setInterval(function () {
alert(stableCount + " - " + $(".rowcount").val())
$("#responsecontainer").load('CyberTable.aspx?t' + Math.random());
}, 3000);
$.ajaxSetup({ cache: false });
});
</script>
The stableCount in the alert comes back as undefined, but the rowcount.val() comes back with the number
EDIT: Please just don't downvote with no reason. As far as i'm aware i've followed all rules to post this and attempted to do it myself.
.rowcountvalue whats return?