Loading ...
Sorry, an error occurred while loading the content.

Popup positioned at top of window in IE7

Expand Messages
  • terry.herckenrath
    I have implemented a popup containing a list of links which is positioned relative to the current cursor position. It works fine in IE6, FF2 and Opera, but in
    Message 1 of 4 , Dec 30, 2008
    View Source
    • 0 Attachment
      I have implemented a popup containing a list of links which is
      positioned relative to the current cursor position.

      It works fine in IE6, FF2 and Opera, but in IE7 the popup is
      positioned at the top of the window.

      I have been unable to figure out what the cause of this is and I would
      really appreciate some help :-)

      To see the problem go here:
      http://www.forensictv.net/select-video-category.htm and scroll down
      the list of Main Categories until you see a bold item (like
      photography) and place the mouse over it.

      Terry
    • Foteos Macrides
      Terry, Remove the: which you presently have at the top of the body section, so that IE7 can properly create and manipulate the overDiv
      Message 2 of 4 , Dec 30, 2008
      View Source
      • 0 Attachment
        Terry,
         
        Remove the:
         
        <div id="OverDiv"></div>
         
        which you presently have at the top of the body section, so that IE7 can properly create and manipulate the overDiv positioned div.  If you do want to specify it yourself, for clarity it should be:
         
        <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000"></div>
         
        as described in the Getting Started:
         
         
        support document.  But the actual problem is that your use of an uppercase o trips up IE7 but not the other browsers.
         
        Fote
        --
         
        ----- Original Message -----
        Sent: Tuesday, December 30, 2008 9:02 AM
        Subject: [OLmws] Popup positioned at top of window in IE7

        I have implemented a popup containing a list of links which is positioned relative to the current cursor position.

        It works fine in IE6, FF2 and Opera, but in IE7 the popup is positioned at the top of the window.

        I have been unable to figure out what the cause of this is and I would really appreciate some help :-)

        To see the problem go here:
        http://www.forensictv.net/select-video-category.htm
        and scroll down the list of Main Categories until you see a bold item (like photography) and place the mouse over it.

        Terry
      • terry.herckenrath
        Thank you so much - it seems like it is always the little things that trip me up... I removed the div to let the script add it and it works fine now :-) Terry
        Message 3 of 4 , Dec 31, 2008
        View Source
        • 0 Attachment
          Thank you so much - it seems like it is always the little things that
          trip me up...

          I removed the div to let the script add it and it works fine now :-)

          Terry
        • Foteos Macrides
          Terry, For backward compatibility with pre-existing documents it s OK when using overlibmws to have specified the overDiv positioned div (but with the style
          Message 4 of 4 , Dec 31, 2008
          View Source
          • 0 Attachment
            Terry,
             
            For backward compatibility with pre-existing documents it's OK when using overlibmws to have specified the overDiv positioned div (but with the style attribute=value pair as well).  However, in new documents it is best to omit it unless you need to change the z-Index from the 1000 default.
             
            Because your document had id="OverDiv" (i.e., with an uppercase lead O) and the argument for the getElementById() javascript function was (and still is for non-IE7 browsers) case-sensitive, a div with id="overDiv" (i.e., with a lowercase lead o) was not being found and thus was being created as the intended positioned div.  But IE7 treats the argument for getElementById() as case-insensitive, thus accepting your pre-existing, non-positioned div (which initially is empty and based on your CSS is centered at the top of the document) as the one being sought.  So IE7 would load the popup content into it, but couldn't reposition it to where you intended.
             
            Unfortunately, such changes in the behavior of IE7 can cause headaches for lots of DHTML scripts in pre-existing documents.  But so far I haven't found any problems for overlibmws unless the document was doing something inappropriate in the first place.
             
            Fote
            --
             
            ----- Original Message -----
            Sent: Wednesday, December 31, 2008 7:19 AM
            Subject: Re: [OLmws] Popup positioned at top of window in IE7

            Thank you so much - it seems like it is always the little things that trip me up...

            I removed the div to let the script add it and it works fine now :-)

            Terry
          Your message has been successfully submitted and would be delivered to recipients shortly.