javascript - how to disable the link in Colorbox iframe? -


<a class='iframe' href="delete.php" onclick="chkdel()"> 

i have use iframe colorbox, after click link , popup confirm box code:

function chkdel(){  if(!confirm("delete?")){ //how stay in current state?  //and not run delete page } } 

return false if user cancels. returning false prevent execution.

function chkdel(){      if(!confirm("delete?")){         return false;     } } 

you can in 1 line inside onclick attribute.

onclick="return confirm('are sure deleting this?');" 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -