A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [RESOLVED] javascript confirmation alert

  1. #1
    Member
    Join Date
    Jun 2006
    Location
    on net
    Posts
    32

    resolved [RESOLVED] javascript confirmation alert

    Hello,
    I need some help with this script:
    Code:
    <script type="text/javascript">
    <!--
    function confirmation() {
    	var answer = confirm("are you sure to delete the record?")
    	if (answer){
    		alert("ok!")
    	}
    	else{
    		alert("cancel!")
    		return false;
    	}
    }
    //-->
    </script>
    and the link to call the function is:
    Code:
    <a href=\"category_delete.php?delcode=$rows[0]\" target=\"_self\" onclick=\"confirmation()\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" /></a>
    I want to stop the javascript function if the user click on "cancel" of the alert window.
    I use return false; but is not working.

    Thanks in advance,
    Nick
    Last edited by nzizo; 11-14-2007 at 12:54 PM.

  2. #2
    Official FK nice guy and MOD 3PRIMATES's Avatar
    Join Date
    Apr 2002
    Location
    Portland Oregon
    Posts
    1,645
    Hey there, its working for me...

    3P

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center