SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: onclick warning doesn't work

  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onclick warning doesn't work

    This "onclick" funcsion in JavaScript in a link on a .php script is supposed to give me a warning before proceeding to the deletion script, but it doesn't. What am I missing?
    PHP Code:
    <p><a href='admin/users/delete_msgs.php?id=<?php echo($userIDnum);?>' onclick=\"return confirm('Really want to delete this?');\">Delete all messages</a></p>
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Remove the slashes before the double quotes in that link.
    17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
    Conversion tracking, click fraud detection, A/B testing and more.

  3. #3
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. That did it. Don't know why the slashes were there in the first place.
    Paul C.
    ClickBasics
    http://www.clickbasics.com

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
  •