Results 1 to 4 of 4

Thread: Java script needed.

  1. #1
    Join Date
    Apr 2008
    Location
    Little Office!
    Posts
    80
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Lightbulb Java script needed.

    Hi i need a javascript which will prompt the users while they close the page with a option of cancel and ok.

    like you can see a example on this page...

    http://forexautopilot.com/?DFresubmit=539514618
    i am not with this link... just got this as a sample.

  2. #2
    Join Date
    Dec 2007
    Location
    Ankara, Turkey
    Posts
    160
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default

    That was really annoying but here is the code:

    Code:
    window.onbeforeunload=function(){return "Please do not go, will you?";};

  3. #3
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    if you just want to ask if they really want to leave the page or not, you could also do that through a link

    Code:
    <a href="/path" onclick="return confirm('Are you sure you want to leave?');">Link</a>

  4. #4
    Join Date
    Apr 2008
    Location
    Little Office!
    Posts
    80
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default Thanks

    Thank you sir... that was really appericated.

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
  •