Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Confirm box after Clicking on Hyperlink

So I have got a hyperlink, which if pressed does a major action ( delete something from the database ) so I want a confirm box once it is pressed so that they dont make mistakes.

My code for the hyperlink is:

<a href='*****.php?Number3=1222&AssignedTo=$12331'>[x]</a>

I am unsure on Javascript, and I know this has a major part in it... Please help? PS The hyperlink's URL is random, and there are many of them so please dont make it so that it only works with one link

like image 791
DogPooOnYourShoe Avatar asked Jan 06 '11 16:01

DogPooOnYourShoe


1 Answers

try

<a href='*****.php?Number3=1222&AssignedTo=$12331' onclick="return confirm('Are you sure you want to delete?')" >[x]</a>
like image 181
Anush Prem Avatar answered Sep 30 '22 10:09

Anush Prem