This topic is locked
[SOLVED]

  Refresh list page after a popup edit

4/12/2011 8:40:57 PM
PHPRunner General questions
G
giles author

Hi,

Congrats on PHPRunner V5.3. It's been a while since I updated (was using V4.1) and this is a great improvement. Keep up the good work.
First question is:

How do I get a list page to refresh after using a popup edit page to change one of the records? In my case the users may enter a value in a status field that means that record is no longer to be displayed on the list page.
I've checked the forum and can't see a solution to this.

A
alang 4/13/2011

It should do it by default. I had a similar problem recently and I suspect there are a few things that may stop the default behaviour working - like using header() function to jump straight back to list page in "After record updated".

A
alang 4/16/2011

Here are a few more reasons - found using popup Add:

  1. Hidden fields that fail validation - ie number field with string assigned
  2. Fields in the $value array that are not in the base table - need to 'unset' in BeforeAdd event
  3. Using add in popup without having inline add checked on Fields tab. If you don't want to use inline add, delete the button in visual editor.

N
nti 4/16/2011

I use the below small script to refresh my inline add which may work for inline edit.
After record added / After recod updated
Modify TABLE for your specific table name.



?>

<script>

window.parent.location="TABLE_list.php"

</script>

<?php
G
giles author 4/19/2011

Thanks for the responses folks.
Yes, I have a few of those issues that would stop the auto refresh of the list however nti's script made for an easy fix.

G
giles author 4/19/2011

A quick addition...
Using:
echo '<script>window.parent.location="TABLE_list.php?a=return"</script>';
(a small change on nti's script) in the after record edited event means that the pop-up search criteria are preserved.