SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI,
    Any of you know how can I stop an exit console when the visitors lefts my site trough a form button?

    The below code is the function that opens the console or popup.
    **********************************
    <script language="JavaScript">
    function exit(){ window.open('XXXXXXX');}
    </script>
    **********************************

    Then on the body tag
    ************************
    <body onUnload="exit()">
    ************************
    Any help?

    Thanks

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your problem is body unload is pretty much a blanket statement.

    Only thing I could think of would be to make an invisible frame.

    You could also always open the form output into a new window that way your website doesn't get unloaded - actually that's probably better than an invisible frame
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not sure I can open the form in a new window since it's a newsletter sponsor's ad, but Anyway i will ask..

    Wht do you mean by invisible frame?

    Thanks for the help


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
  •