<script>
alert('helllo');
$('button.savebtn').click(function() {
alert('testin');
var Row1 = $(this).closest('tr').find("#mi").text();
alert(Row1);
var Row2 = $(this).closest('tr').find("#mn").text();
var dataString = "Id=" + Row1 + "&Name=" + Row2;
alert(dataString);
});
</script>
I got the the following error from above code, is anyone able give me the reason why the error occurs??
Uncaught SyntaxError: Unexpected token < at Object.InjectedScript._evaluateOn (:875:140) at Object.InjectedScript._evaluateAndWrap (:808:34) at Object.InjectedScript.evaluate (:664:21)
<script>when adding JS in separate file..jsextension you just write javascript, HTML is allowed in there but only as a string to be appended to other elements.