SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,233
    Mentioned
    52 Post(s)
    Tagged
    2 Thread(s)

    IE9 vs .style.display="none" ?

    I'm a novice. Please overlook the old code and forgive my ignorance.

    http://www.rogue-eagles.org/Newslett...wsCat3h-IE.htm

    1. Open the page and see a calendar of newsletters followed by a "webmaster's note".
    2. Reduce the height of the browser window to less than the height of the viewable content.
    3. Note the length of the "thumb" in the scrollbar.
    4. Click the "webmaster's note" to hide it. (a JavaScript action)
    FYI: This page uses a "sticky footer".
    5. Note that the footer is properly placed at the bottom of the window.
    6. HOWEVER, notice that the "thumb" in the scrollbar did not change.
    7. Scroll down and find that the space formerly occupied by the "webmaster's note" now appears beneath the "sticky footer".

    Because this particular feature works in FF and IE8, I assume this is an IE9 bug.
    Any advice is welcome. Is it possible for JavaScript to tell IE9 to recalculate the length of the visible content after the "note" is dismissed?


    This page has one other problem. IE8 does not respond to the "hide new" button. I don't know how else to write that function. Recommendations would be appreciated.

    Code javascript:
    var newlinks = new Array();
    newlinks = getElementsByClassName('newlinks');    // getElementsByClassName function in use for IE8
    function NewLinks() {
        if ( newlinks[0].innerHTML == 'hide<br>new' ) {
            HideNewLinks();
        } else {
            ShowNewLinks();
        }
    }


    Finally, a feature wish! If looking at the 2010 catalog (for example), I would like the visible portion of the page to remain as-is in the viewport when "show all" is clicked and the content area is expanded, rather than jumping to the current year (2012) when the content is expanded. Can anyone point me to a resource where I might learn how to do that?

    Thanks in advance.

  2. #2
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,233
    Mentioned
    52 Post(s)
    Tagged
    2 Thread(s)
    The second issue, the one about the 'hide new' button, has been solved. It seems that IE8 expects the tag returned by the innerHTML call to be UPPER CASE. (Learned how to write an "or" condition.) :-)


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
  •