This topic is locked
[SOLVED]

 Refresh on Event

7/20/2010 5:47:15 AM
PHPRunner General questions
S
Spoils author

Hi
Is it possible to Refresh after a recorded has been Added or Edited within the Events editor?
Cheers

J
Jane 7/20/2010

Hi,
I'm not sure that I fully understand your question.

Could you give me more detailed description of what you want to achieve?

S
Spoils author 7/20/2010

Hi,
I would like to force a Refresh once a record has been either Added or Updated. I have been trying to add this in Events - Edit Page - After Record updated. Using:
header("Refresh: 1");
Similar to the redirect code.
However my attempts have failed.
Thanks

J
Jane 7/20/2010

Record will be added twice to the database if you refresh page after saving.

Could you clarify what you want to achieve using this code?

S
Spoils author 7/20/2010

Hi
Sorry for the confusion, I would like to refresh the list page after an edit or an update. The reason for this is because I think they're maybe a bug with the display of hidden linked tables if no child record exists. I have 2 table links with the option to hide if no child record exists. One of them is hidden due to not having a child record, when I edit a record and the list page is updated, the linked tables are displayed weather they have a child record or not. So the only way to get around not displaying this linked table is to refresh the page after an edit has taken place.
So I was hoping there was a function I could use within the Events - Edit Page - After Record updated to achieve this.
Im quite a newbie to PHP so the code mentioned previously was something I found on a tutorial. Any ideas how to refresh the list page after a record has been updated would be much appreciated.
Thanks

A
ann 7/21/2010

Hi,
to refresh page after inline editing/adding you need to edit generated inlude/inlineedit.js file, find this code:

setTimeout('$("#uploadForm'+id+'").remove()',500);



and add following code just after:

setTimeout('window.location.reload(true)',1000);
S
Spoils author 7/21/2010

Thanks Ann worked great =)