Krista wrote:
eg, when i click "No" button, the system will do deletefunction(), and
go back to previous page. I only know if the button is
<input type =\"button\" name=\"submit\" value=\"No\"
OnClick=\"javascript:history.go(-1)\" ><br> i can go to previous page.
But how can i do deletefunction()??
Going back with JavaScript does not submit to the server (I think), and
therefore you can't execute anything.
Instead make that a normal submit button and process it with php,
calling deletefunction() and redirecting to some page on your site:
<input type="submit" name="submit" value="No"/>
and your PHP script
<?php
// ...
if ($_POST['submit'] == 'No') {
deletefunction();
$redir = 'http://www.yoursite.com/index.html';
header('Location: ' . $redir);
// some browsers may not follow the redirect
exit("Redirected: <a href=\"$redir\">$redir</a>.");
}
// ...
?>
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--