DataTable Column Click Not Bringing New Page.

DataTable Column Click Not Bringing New Page.

MANIKUME24MANIKUME24 Posts: 2Questions: 1Answers: 0

Hi All,

I have a data table with 5 columns in each row & my last column is having an edit image. Click on the image of any row, it will pass the row data to Controller thru an Ajax post call with JSON data type & in the controller I am returning a new view. But I am not getting back the new view. Instead getting below error

 pulseAjax/<.error()pulse.js (line 59)
 XMLHttpRequest = Object { readyState=4, responseText="ocrNonOmnibusAcctPage", status=200, more...}
 textStatus = "parsererror"
errorThrown = 
detailed error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

I am not able to get what this error mean. Can someone please help?

Answers

  • larsonatorlarsonator Posts: 54Questions: 4Answers: 2
    edited July 2014

    What is happening here is that javascript is waiting for a response. You will find in your callback, the html is being passed in your data parameter. You could try to render the last row as a link, or at the end of your webscript try a redirect if you are trying to load a new page.

  • MANIKUME24MANIKUME24 Posts: 2Questions: 1Answers: 0

    Thanks for the info larsonator. For now I changed my code to create a dynamic form when the image is clicked & pass the row as hidden field to the form & submitted the form to the controller.

This discussion has been closed.