1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Preventing a F5 Refresh from propagating from an IFRAME to top lev

Discussion in 'Internet Explorer' started by Jeffrey Magder, Apr 5, 2010.

  1. Jeffrey Magder

    Jeffrey Magder Flightless Bird

    Is there a way to stop F5 refreshes from propagating from an iframe to the
    top level?

    Normally you can capture key events with an onKeyDown event handler. You can
    use this to capture an F5 key press and cancel the event from becoming a
    refresh. However, if this happens within an iframe (where you can't touch the
    content of the iframe), the event seems to trigger a refresh across the
    entire page. Does anyone know of a way to prevent the iframe refresh event
    from refreshing the entire webpage?

    This will occur in IE and Firefox even if the iframe is 20 levels deep
    within an iframe, which seems incorrect to me. But since it is consistent
    across all browsers I'm wondering if my understanding of the iframe itself is
    incorrect.
     
  2. PA Bear [MS MVP]

    PA Bear [MS MVP] Flightless Bird

    Developer-specific resources include:

    MSDN IE Development Forum (post such questions here instead)
    http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

    Tip: When posting in Developer forums, always include a link to your web
    site or test pages in your first post.

    IE Developer Center
    http://msdn.microsoft.com/en-us/ie/default.aspx

    Learn IE8
    http://msdn.microsoft.com/en-us/ie/aa740473.aspx

    HTML and DHTML Overviews and Tutorials
    http://msdn.microsoft.com/en-us/library/ms537623.aspx and

    Cascading Style Sheets (CSS)
    http://msdn2.microsoft.com/en-us/ie/aa740476.aspx

    Expression Web SuperPreview for Internet Explorer (free, stand-alone visual
    debugging tool for IE6, IE7, and IE8)
    http://www.microsoft.com/downloads/...FamilyID=8e6ac106-525d-45d0-84db-dccff3fae677

    Expression Web SuperPreview Release Notes
    http://www.microsoft.com/expression/products/Web_SuperPreviewReleaseNotes.aspx

    Validators:
    http://validator.w3.org/
    http://jigsaw.w3.org/css-validator/


    Jeffrey Magder wrote:
    > Is there a way to stop F5 refreshes from propagating from an iframe to the
    > top level?
    >
    > Normally you can capture key events with an onKeyDown event handler. You
    > can
    > use this to capture an F5 key press and cancel the event from becoming a
    > refresh. However, if this happens within an iframe (where you can't touch
    > the content of the iframe), the event seems to trigger a refresh across
    > the
    > entire page. Does anyone know of a way to prevent the iframe refresh event
    > from refreshing the entire webpage?
    >
    > This will occur in IE and Firefox even if the iframe is 20 levels deep
    > within an iframe, which seems incorrect to me. But since it is consistent
    > across all browsers I'm wondering if my understanding of the iframe itself
    > is incorrect.
     

Share This Page