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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JavaScript Confirm on a link

    Hi,

    I have a link on a site that i'm developing that will remove a persons record. How can I invoke a confirm box when a user clicks on the link to see if they want to go ahead with it?

    Thanks

  • #2
    New Coder
    Join Date
    May 2003
    Location
    UK
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    like this

    <a href="http://www.url.com" onClick="return window.confirm('confirm logout')" >logout of my website</a>
    They only tell you its a stupid question when they don't know the answer!

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts
    spot on mate.......

    cheers


  •  

    Posting Permissions

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