E
Eric
I have a confirm alert before the user goes to a delete page, and it
doesn't matter if the user clicks ok or cancel - they always go to the
delete page.
I have the following code:
<a href="vehicle_history_delete.php?history_id=18&vehicle_id=5"
onclick="return DelAlert();"><img border=0
src="/images/delete_category_16.gif" alt="Delete This record"
title="Delete this record">
Where DelAlert() looks like:
<script language="JavaScript" >
function DelAlert() {
if (confirm("Are you sure you want to delete this history record?"))
{
return true;
} else
{
alert('Should be false');
return false;
}
}
</script>
And have tried
<a href="vehicle_history_delete.php?history_id=10&vehicle_id=5"
onclick="return confirm('Are you sure you want to delete?')">
<img border=0 src="/images/delete_category_16.gif" alt="Delete This
record" title="Delete this record">
</a>
as well.
This DOES prevent the navigation to the delete page:
<a href="vehicle_history_delete.php?history_id=10&vehicle_id=5"
onclick="return false;">
But is obviously not acceptable.
Here's the kicker. The same code on a different page works fine. This
page does not work in either IE or Firefox.
Ever happen to anybody before?
Eric
doesn't matter if the user clicks ok or cancel - they always go to the
delete page.
I have the following code:
<a href="vehicle_history_delete.php?history_id=18&vehicle_id=5"
onclick="return DelAlert();"><img border=0
src="/images/delete_category_16.gif" alt="Delete This record"
title="Delete this record">
Where DelAlert() looks like:
<script language="JavaScript" >
function DelAlert() {
if (confirm("Are you sure you want to delete this history record?"))
{
return true;
} else
{
alert('Should be false');
return false;
}
}
</script>
And have tried
<a href="vehicle_history_delete.php?history_id=10&vehicle_id=5"
onclick="return confirm('Are you sure you want to delete?')">
<img border=0 src="/images/delete_category_16.gif" alt="Delete This
record" title="Delete this record">
</a>
as well.
This DOES prevent the navigation to the delete page:
<a href="vehicle_history_delete.php?history_id=10&vehicle_id=5"
onclick="return false;">
But is obviously not acceptable.
Here's the kicker. The same code on a different page works fine. This
page does not work in either IE or Firefox.
Ever happen to anybody before?
Eric