Jquery button onclick function is not working
Uncaught Syntax error: Unexpected end of input (at TestingSensorList: line 16:161
Uncaught Syntax error: Unexpected end of input (at TestingSensorList: line 135:163
Uncaught Syntax error: Unexpected end of input (at TestingSensorList: line 249:161
<script type="text/javascript">
function updateEventStatus(sensorID) {
$("#btnUpd").click(function () {
$.post("/Testing/SendDirtyFlags", { id: sensorID }, "active": false }, function (data) {
if (data == "false") {
if (dirty = "false")
div.addClass("sensorStatusAlert");
div.removeClass("sensorStatusOK");
else {
$.post("/Testing/SendDirtyFlags", { id: sensorID }, "active": true }, function (data) {
if (data == "true") {
if (dirty = "true")
div.addClass("sensorStatusOK");
div.removeClass("sensorStatusAlert");
alert("data");
}
});
});
}
</script>