why does this work: " onClick="javascript:return confirm('Are you sure you want to delete this country ?')">X DELETE COUNTRY X
and by work, i mean when the alert box pops up and if you click "cancel" nothing happens, but if you click "submit" then it goes to the href location.
but not this:
with the code pulling in a function, both the "submit" and "cancel" buttons go to the href location.
" onclick="check_delete()">X DELETE COUNTRY X
with this js function in the header: function check_delete(){return confirm(' Are you sure you want to DELETE this country?');}
try your second link like this
" onclick="return check_delete()">X DELETE COUNTRY X
with a return in your onclick
thanks!
Sorry, you must be a member to post to a conversation. Either
log in or
sign up
to get involved.