This topic is locked

page refresh after button click

10/2/2014 10:52:22 AM
PHPRunner General questions
C
cyberslugg author

Hello,
I am using this http://www.asprunner.com/forums/topic/14436-add-delete-button-for-each-row-result/ to add deleting to some listed records.
I am just wondering if there is a way to insert a screen refresh as part of this button push that will update what the user is seeing. Currently if I click delete there is a short refresh but the record is still listed. If I then delete a second item the first one disappears from the screen but the second one still remains.
Thanks

C
cyberslugg author 10/6/2014

I wondered if I could insert a window.location.reload(); into the process. Unfortunately I am not able to nail down the coding correctly. Does anyone with a good understanding of how the solution I referenced works, have an idea if I can and where I would insert the window.location.reload(); ?
thanks

C
cyberslugg author 11/10/2014

I am still a little stuck on this... maybe I'm just being brain dead, but can anyone tell me where to add a code to refresh after the delete is pushed?

The delete function works, but I have to push delete twice or press the refresh button after the delete to clear the deleted item off the screen
On List Page: Before record processed

if ($_REQUEST["a"]=="delete"&& $_REQUEST["recordid"])

{

$sql="delete from SpecialIntrest where Id=".$_REQUEST["recordid"];

CustomQuery($sql);

}
List Page: After record processed

$record["Custom_Delete"] = "<a href=\"Renew_SpecialIntrest_list.php?a=delete&recordid=".$data["Id"]."\">delete</a>";