This topic is locked

Back to original page after editing. How?

10/2/2006 5:21:50 AM
PHPRunner General questions
M
mmponline author

I've added an event "go to page" when record has been updated (saved). - it works fine. When I edit a data entry -on say page 2 or 3 of my list of data and save it, it goes back to the first page of my list instead of the page the original entry was on.
Is there a way to edit the event to go back to the original page?
Further (to be really fancy) can the entry be highlighted (another colour) to show that it's the last entry been worked on - this would really be cool!

R
RickG 10/2/2006

Is there a way to edit the event to go back to the original page?

If you remove your "go to page event" and simply have the user click on the "Back to List" link it will take them to the correct page.
My post in this thread had to do with a (slightly) similar issue. Even though the user ends up on the correct page, they are at the top of the page. If they are editing a list page with 100 entries, its kind of a pain to scroll back down. Sergey outlined how to open the Edit window in a new target in v3.1 (it always returned a blank in 3.0).

Alexey admin 10/2/2006

Stephan,
use the following code to return to List page:

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

M
mmponline author 10/2/2006

Thanks Sergey, the snippet works perfectly to do what I need.
I also like the one by RickG for opening a new page. However, is there a way to close the new window when saving this page, so that the original window apears? Just a nice to have -I dont need this (just now)
Thanks again for your quick and accurate support.

J
Jane 10/3/2006

Stephan,
to close edit window after you save the record open templates/..._edit.htm file, find following line:

<input class=button type=submit value="Save" id=submit1 name=submit1>



and replace it with this one:

<input class=button type=submit value="Save" id=submit1 name=submit1 onClick='window.close();return false;'>