Hello!!
I can't, for the life of me, figure out why this code is unresponsive. When I first wrote it it worked once, then never again. Here it is:
Embeded javascript (in head tag):
HTML:Code:<script type="text/javascript"> function deleteConfirm(){ var confirmDel = confirm("Are you sure you want to delete this image?"); if(confirmDel){ //Continue to edit.php }else{ return false; } } </script>
So, I've tried everything I can think to fix this but for some reason it just doesn't do anything. Even if I replace the confirm script with a simple alert: nothing. I added window.onload = function(){ alert("Hello"); } and that worked just fine.HTML Code:<form name="deleteForm" id="deleteForm" method="post" action="edit.php"> <input type="submit" name="btnDelete" id="btnDelete" title="Delete Image" value="X" onClick="return deleteConfirm()" /> </form>
For the actual onClick script I've done onClick, onclick, added a ';' at the end of the brackets...


Reply With Quote

Bookmarks