Using the Custom Event sample from demos, I am trying to update two tables at the same-time using a custom SQL update. The query has a join on two tables. Everything works correctly during an inline edit.
However – if I use the pop-up Edit window it works when I hit submit – but the Edit Modal window does not go away and I get an error “Uncaught SyntaxError: Unexpected end of JSON input” on the error-console (Chrome and Firefox).
It seems as though this line is where it’s failing:
var data = JSON.parse(response.responseText;
I am unsure how to solve this issue. Do you have any suggestions? It almost seems like the custom event handler needs a way to send a valid response to the Modal on Submit.
Thanks for any help.
In your custom event callback function … you need to return following before function end.
$res = array(“id” => 0, “success” => true);
Abu Ghufran - Dev Team
PHP Grid Framework
This code didn’t work when I added it to the update-data function. I couldn’t find this example in your demo-code, so I looked in jqgrid_dist and found-it there. I reviewed the code and realize with the custom event handler $res is not getting set.
I see further-on you have a function for phpgrid_msg with options for confirmation text and fade
. . . I tried setting a custom message after the update and this worked.
Thank you for pointing me in the right direction.
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!