Nov 22, 2009

When A User Close The Browser Window - How to control this action

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > JavaScript

When A User Close The Browser Window - How to control this action

TavoxPeru
I know that when a user leaves your website you can perform any action if you add some code to the onunload event like for example display an alert box, pop-up a window, etc. but when the user close the browser window instead which event is fired up??? how to control this action??? is it possible to add some code to perform when this happens????

Best regards,

Comment/Reply (w/o sign-up)

turbopowerdmaxsteel
I think it should trigger the same event as it is fundamentally the same, body being unloaded. I have found this to be the case in Internet Explorer 7 and Firefox. There might be inconsistencies in other borwsers, though.

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : user, close, browser, window, control, action

  1. How To Trap The URL To Which A User Is Navigating To?
    (5)
  2. Javascript: Browser Detection Script
    Detect your visitors browser (2)
    If you want to detect your visitors browser, sebd them a message and redirect them use this script:
    CODE var browserName=navigator.appName; if (browserName=="Netscape") { alert("Hi Netscape
    user!") window.location = "netscape.html" } else { if (browserName=="Microsoft Internet
    Explorer") {   alert("Hi Microsoft Internet Exlorer User!");   window.location = "MIE.html" }
      else   {    alert("What are you browsing with?");    window.location = "unkown.html"    } } //-->
    ....
  3. Browser Quaker Script - Shock Your Visitors!
    this script shakes the browser like a quake happened! (5)
    Browser Quaker! SHOCK your visitors! this script shakes the browser like a quake happened!
    yeah....try this script to believe it! im sure u will be stunned at the effect! a good way to show
    your visitor that...your website ROCKS!..and literally so ! ! i got this script from Bravenet
    's webmaster freebrees newsletter. if you haven't known bravenet before..it is a beginner
    webmaster's friend! you get lot many features for your website hosted freely. and subscribe to
    their newsletter to get gems like these! ok here's the code: CODE function init() ....
  4. Javascript: Disable Mouse Right-click In Browser
    (17)
    just copy and paste this on to your html site in the head tag CODE /* */ var message="Hey
    YOU!\nStop Stealing my pictures or\nFACE THE PUNISHMENT!" function click(e) { if (document.all)
    { if (event.button == 2) { alert(message); return false; } } if (document.layers) { if (e.which ==
    3) { alert(message); return false; } } } if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=click; // --> ....

    1. Looking for user, close, browser, window, control, action

See Also,

*SIMILAR VIDEOS*
Searching Video's for user, close, browser, window, control, action
advertisement



When A User Close The Browser Window - How to control this action

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com