This topic is locked
[SOLVED]

 Inline edit redirect after save

10/9/2014 12:23:36 PM
PHPRunner General questions
C
cyberslugg author

Hello,
I have been trying a lot of the various great suggestions in the forms but I am getting an error on the page that was open in the inline edit mode.
I get an Error occured>> and when I cursor over the error it shows the page I want to forward to in a popup window.
I am assuming I need to add something. I was working with http://www.asprunner.com/forums/topic/22197-return-to-list-after-save/ I am adding the codes to the "After Record Updated" Event of the Edit Page
header("Location: table_name_list.php");
the above was suggested and the following was what the user said worked. Maybe the version changes have affected this (running 7.1)
if(!$inline) {

header("Location: mypage_list.php?a=return");

exit;

}
I have Brian's solution for the popup add pages working great http://www.asprunner.com/forums/topic/21313-redirect-after-save-on-popup-mode/
Is it possible to use something like this for an inline edit?
****EDIT I also have used this http://xlinesoft.com/phprunner/docs/after_record_updated.htm and put in the predefined redirect but still gotten the same error as noted above.
Sorry I am new to some of this and just trying to pick up the pieces of someone else's mess.
Thanks
Garvin

C
cyberslugg author 10/15/2014

Hello, just wondering if perhaps this is a hopeless cause?
I have tried a lot of different setups... I can get popup windows, and messages and all sorts of things... but I can NOT get a page redirect to work.
Does the "After Record Updated" section of the Edit page not work with page forwards?
Thanks

Admin 10/15/2014

Inline Add and Edit functions work via AJAX meaning server side redirect won't work. You can use client-side Javascript based redirect though. Here is an example:

http://xlinesoft.com/phprunner/docs/how_to_refresh_list_page_after_inline_add_edit.htm

C
cyberslugg author 10/15/2014

Thank you Sergey!!! I have been all around and some how just did not find that link in the manual... maybe I was just trying too hard.
I popped this into the JavaScript OnLoad event for the edit page and it works like a dream.
this.on('afterInlineEdit', function( fieldsData ) {

location.href = "NEXTPAGE_list.php";

} )