Results 1 to 4 of 4

Thread: More JavaScript Problems

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Unhappy More JavaScript Problems

    Why won't this work right?:

    Code:
    <script type="text/javascript">
        function delete() {
            c = confirm("Are you sure you want to delete the selected messages?");
            event.returnValue = c;
        }
    </script>
    ??
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    <a href="#" onClick="if(confirm('Are you sure you want to delete these message(s)?')) return true; else return false;">Delete</a>
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  3. #3

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Thanks for working it out with me over AIM, Matt.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    You don't actually need the if then thing in there, you can just do it like this:

    Code:
    <a href="#" onClick="return confirm('Are you sure you want to delete these message(s)?');">Delete</a>

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