Is there any other way to have a JS function on exit other than using ...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jer
    God is Brazilian
    • Feb 2001
    • 10601

    #1

    Is there any other way to have a JS function on exit other than using ...

    Is there any other way to have a JS function on exit other than using "onunload" in the body or frameset?

    I want to send all exits from a site with frames to a JS function. I tried putting a hidden frame with just the code and onunload but it doesn't work sometimes when the main frame page is still loading.

    Thank you

    Jer
  • sucker
    Confirmed User
    • Feb 2002
    • 1346

    #2
    onbeforeunload
    [email protected]


    Comment

    • sucker
      Confirmed User
      • Feb 2002
      • 1346

      #3
      actually i think you can just add it to an image, like < img src="image.gif" onunload="Function()">
      [email protected]


      Comment

      • Jer
        God is Brazilian
        • Feb 2001
        • 10601

        #4
        Originally posted by sucker
        onbeforeunload
        Sweet. When I read your post I thought you were joking, but I did a google search and confirmed it. I just put it online in one of my domains. Thank you very much.

        Comment

        • sucker
          Confirmed User
          • Feb 2002
          • 1346

          #5
          actually you cant do that (img tag thing ) but you could add this to the body tag onabort="function();"
          [email protected]


          Comment

          • Jer
            God is Brazilian
            • Feb 2001
            • 10601

            #6
            Originally posted by sucker
            actually you cant do that (img tag thing ) but you could add this to the body tag onabort="function();"
            I didn't know about that command too. Thank you.

            Comment

            Working...