This topic is locked

Show Error occurred when update in inline edit

10/5/2019 12:20:09 PM
PHPRunner General questions
F
fsyeung author

I have a script of redirect to the list page "header("Location: model_list.php");exit();" after record update in Add page or Edit page.When i update the record in inline edit / add function, it show Error occurred. But I update in the normal Add page or edit page, it is ok. Please help to solve this problem. thanks.

Sergey Kornilov admin 10/6/2019

You cannot do redirects when using inline Add or Edit. This functionality is implemented via AJAX and redirects will break it.

F
fsyeung author 10/17/2019



You cannot do redirects when using inline Add or Edit. This functionality is implemented via AJAX and redirects will break it.


You mean I cannot add a redirect scripts when I using inline Add / Edit function and not any solution.

Sergey Kornilov admin 10/17/2019

The point of inline add/edit is that you can do something quickly without leaving the page. Also, someone can open multiple inline adds or edits and your redirect will make them lose data in unsaved records.
If you absolutely must to do this, you can use Javascript redirects.

Check this article: https://xlinesoft.com/phprunner/docs/how_to_control_inline_add_edit_functionality_from_script.htm

Section "How to execute JavaScript code after Inline Add or Edit"