View Single Post
  #8 (permalink)  
Old 03-20-2007, 07:58 PM
nickvd nickvd is offline
WMG Newcomer
 
Join Date: Mar 2007
Posts: 17
iTrader: (0)
nickvd is on a distinguished road
Default

The code I posted will do exactly what you need it to do. I prefer to nudge people into the correct direction, rather than just providing turn by turn directions to their destination. That being said, the following javascript should do what you want:

PHP Code:
var link document.getElementById('id_of_link'); // the delete page link
link.onClick = function(){ // when the link gets clicked
  
if (confirm("Are you sure you wan to continue?")) {
    return 
true//let them continue...
  
}
  return 
false// they canceled out, don't follow the link
}; 
I haven't tested the code, but I cant see anything wrong with it. Test it out, adapt it for your needs and let us know what happens!

note, i used [ php ] tags only for the highlighting, the code is javascript
Reply With Quote
Sponsored Links
Register and sign in to hide this ad block