SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2003
    Location
    here
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    netscape and forms AARRGG!

    Ok I have a form that gets submitted when the user closes the broswer window(I need to submit where the user was on the page and test scores). It works in IE fine, but in Netscape 6.2+ the form dosen't get submitted.

    This is all in frames and on the frameset page I call the function like so:

    onunload="window.frameName.data.closeIt();"

    the closeIt function also closes a window if it is open

    function closeIt(){
    document.formName.submit();
    if (typeof window.myWindow != "undefined"){
    window.myWindow.close();
    }
    }

    seems pretty straight forward to me, but it dosen't work in netscape UNLESS I add a totally usless alert box like:
    alert('why does this matter?') after the the document.formName.submit();

    This page is launched from another page so when this page closes the browser is still opened elsewhere.

    In Netscape 7x this is not a problem, but this project must be compatible back to NS6.2. I can do a work around by having:

    function closeIt(){
    if (typeof window.myWindow != "undefined"){
    window.map.close();
    }
    document.formName.submit();
    win = window.open('','fixNS','width=10, height=10'); win.close();
    }

    And the form gets submitted.

    This seems like a ugly work around to me so if anyone has any info on the NS6.2 issue and how (if possible) to fix it...

    That'd be awesome!

  2. #2
    SitePoint Addict
    Join Date
    Mar 2002
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OnUnLoad simply not supported by earlier versions of NS. Sorry.

    Nick
    All4YourPC for all your PC needs. Custom software.
    Websites. Web marketing. Training.
    http://members.aol.com/nickjc67


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
  •