RichardFox
asked on
Reloading page from action script
Hi,
TO illustrate my question, I have 2 scripts, list.php and action.php.
list.php displays a form with a list, each list entry having a checkbox, and a 'remove' button. When the 'remove' button is clicked, the form is submitted to action.php, and the checked entries should be removed and list.php reloaded.
What is the syntax for simply reloading list.php in the window, from action.php?
Thanks,
Rich
TO illustrate my question, I have 2 scripts, list.php and action.php.
list.php displays a form with a list, each list entry having a checkbox, and a 'remove' button. When the 'remove' button is clicked, the form is submitted to action.php, and the checked entries should be removed and list.php reloaded.
What is the syntax for simply reloading list.php in the window, from action.php?
Thanks,
Rich
You can use javascript:
<?php
// code to remove the checked entries
echo "<html><head><title>Name of Company</title></head><bod y>";
echo "<script language=\"javascript\">wi ndow.locat ion=\"list .php\";</s cript>";
echo "</body></html>";
?>
<?php
// code to remove the checked entries
echo "<html><head><title>Name of Company</title></head><bod
echo "<script language=\"javascript\">wi
echo "</body></html>";
?>
That or you can use a header redirect:
header("Location: http://www.newdomain.com/list.php");
exit();
header("Location: http://www.newdomain.com/list.php");
exit();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thg's approach is the method I use personally.
I think that they are what you are looking for.