JavaScript runtime error: Syntax error
I am using Jquery to delete a file but getting
0x800a03ea - JavaScript runtime error: Syntax error whenever this this line get hit
$('#TestTable').html(data);
Below is whole code
- $(document).ready(function () {
-
- $('.delete').attr('href', 'javascript://');
- $('.delete').click(function () {
- $dialog.data('id', $(this).attr('id')).data('contId', $(this).attr('contId')).dialog("open");
-
- });
-
- var $dialog = $('<div/>')
- .html("Warning: This will remove the selected file.Only remove this file if you intend not to use it again.<br/><br/>Do you wish to continue?")
- .dialog({
- autoOpen: false,
- resizable: false,
- height: 250,
- modal: true,
- title: 'Remove file',
- buttons: [
- {
- text: "Continue",
- id: "continuebtn",
- click: function () {
- var _id = $(this).data('id');
- var _contId = $(this).data('contId');
-
- var parameters = { id: _id, contId: _contId };
- $.ajax({
- url: "/AdminFiles",
- type: "GET",
- data: parameters,
- success: function (data, textStatus, jqXHR) {
- $('#TestTable').html(data); ------> Error here
- alert("testing delete");
-
- $('#contId').val("");
- alert("testing delete");
- }
- });
- $(this).dialog('close');
- }
- },
- {
- text: "Cancel",
- id: "cancelbtn",
- click: function () {
- $(this).dialog("close");
- }
- }]
- });
- });