Solved

Confirmation box before delete

Posted on 2011-03-15
2
472 Views
Last Modified: 2012-05-11
Hi
I have”Delete” text as a link (please see the code bellow). When you click on the Delete sends id-delnumber to delete function. I will make it that appears a message box and ask if you sure? Yes and No, before the delete-id sends to the delete function.

<?php   echo "<a href=lastnews.php?id-delnumber=".$row["id"]."> Delete </a>"; ?>
0
Comment
Question by:sam20
2 Comments
 
LVL 8

Accepted Solution

by:
Rik-Legger earned 500 total points
ID: 35138951
It is a little bit hard to read what you exactly want,
but i think you mean something like this:

<?php   
echo "<a href=lastnews.php?id-delnumber=".$row["id"]." onclick=\"if (confirm('Are you sure you want to delete?')) { return true;  }; return false;\"> Delete </a>"; 
?>

Open in new window

0
 

Author Closing Comment

by:sam20
ID: 35139123
Thank you
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question