Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    delete confirmation alert

    I have a delete button which is linked to delete_action page.

    So if a user click the delete button, it will go to delete_action page.

    I like to make an alert which conforms "delete or not" before it will go to delete_action page.


    The confirmation alert, for example, will say " will you delete? " and have the two option buttons "Yes" and "no."


    Can make the confirmation alert with your javascript help?


    You can see what I am trying to do at http://220.89.242.19:8500/test/011/home/read.cfm?ID=1.
    Get my greedy up

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try javascript confirm().....

  • #3
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Willy Duitt
    Try javascript confirm().....
    How can I write the javascript confirm?
    Get my greedy up

  • #4
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by joonstar
    How can I write the javascript confirm?
    A search of this forum would return many examples or you could try Google: Keywords: javascript confirm....

  • #5
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Willy Duitt
    I think I found the right page( http://webreference.com/programming/...confirm/2.html ). Thank you
    Get my greedy up

  • #6
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    625
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <script type="text/javascript">
    <!--
    
    function chkFrm(){
    
    var doc = document['oFrm'];
    var subConf = confirm ("DELETE?!?!" + "\r\n\r\n" + "Click \"OK\" to delete," + "\r\n\r\n" + "or \"Cancel\" to return.");
    
    if (subConf == true){
    doc.submit();
    
    } else if (subConf == false){
    return false;
    }
    }
    
    //-->
    </script>
    
    
    <form name="oFrm" method="post" action="delete.php">
    <input type="button" value="submit" onclick="javascript:chkFrm();" />
    </form>

    -james
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "

  • #7
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you, jamescover.

    Your code works fine.
    Get my greedy up


  •  

    Posting Permissions

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