SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict ghostme's Avatar
    Join Date
    Feb 2005
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    javascript confirm box

    Hello good forum,
    I have created a form with two submit button “Delete and Edit” in the form I have a javascript code, that displays a confirm box when the delete button is clicked, clicking on cancel should stop the execution of the delete script and ‘ok’ should run the script. Now, using the form this way works perfectly in Mozilla fireworks, but IE posing a problem when I click on cancel, it still executes the delete script.
    Code:
    PHP Code:
    <form method="post" action="eddel.php" >
    <
    input type="submit" value="delete" name="delete" onclick=”return confirm(‘are you sure you want to delete record?);>
    <
    label>
    <
    input name="edit" type="submit" value="edit" />

    </
    form

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Why are you using back ticks and what are those quotes?
    I tried this, it worked:
    HTML Code:
    <input type="submit" value="delete" name="delete" onclick="return confirm('are you sure you want to delete record?')";>
    Saul


Bookmarks

Posting Permissions

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