My PHP page has a link to delete one MySQL table datum. I want it to be in such a way that when I click the \'delete\' link a confirmation box should appear and it should ask \
onclick="return confirm('Log Out?')? window.open('?user=logout','_self'): void(0);"
Did this script and afterwards i tought i go check the internet too.
Yes this is an old threat but as there seems not to be any similar version i thought i'd contribute.
Easiest & simplest way works on all browsers with/in any element or field.
You can change window.open to any other command to run when confirmation is TRUE, same with void(0) if conformation is NULL or canceled.