In spite of using iFrame the whole page reloads in IE?!?

Discussion in 'ASP .Net' started by MaigoSchaeffer@googlemail.com, Jan 30, 2008.

  1. Guest

    Hello together,

    I have the following problem: I use a iFrame in a aspx-site whose
    contents should be reloaded all three seconds, because it concerns a
    running curve. This also functions admirably with Firefox, but NOT
    with IE 5/6 or 7...

    Any ideas?

    Here is the code of my iFrame:

    <iframe id="iframe" src="Redraw.aspx" width="1200" height="700"
    onload="javascript:window.setTimeout('document.location.reload()',
    3000)" style="z-index: 102; left: 16px; position: absolute; top:
    184px"></iframe>
     
    , Jan 30, 2008
    #1
    1. Advertising

  2. iframe is a element of the parent document, so when you state
    'document.location.reload' you are reloading the parent document. you need
    to add the 'document.location.reload' line to the child page not to the
    iframe



    <> wrote in message
    news:...
    > Hello together,
    >
    > I have the following problem: I use a iFrame in a aspx-site whose
    > contents should be reloaded all three seconds, because it concerns a
    > running curve. This also functions admirably with Firefox, but NOT
    > with IE 5/6 or 7...
    >
    > Any ideas?
    >
    > Here is the code of my iFrame:
    >
    > <iframe id="iframe" src="Redraw.aspx" width="1200" height="700"
    > onload="javascript:window.setTimeout('document.location.reload()',
    > 3000)" style="z-index: 102; left: 16px; position: absolute; top:
    > 184px"></iframe>
     
    ThatsIT.net.au, Jan 30, 2008
    #2
    1. Advertising

  3. Guest

    On 30 Jan., 11:41, "ThatsIT.net.au" <me@thatsit> wrote:
    > iframe is a element of the parent document, so when you state
    > 'document.location.reload' you are reloading the parent document. you need
    > to add the 'document.location.reload' line to the child page not to the
    > iframe


    Thank you ThatsIT.net.au,

    you mean I should state 'document.location.reload' to the body-
    element???
    I tried this, but has no affection on the behavior?!?

    I want ONLY the iFrame to be reloaded, not the whole Page!
    Why does it work in Firefox perfectly???
     
    , Jan 30, 2008
    #3
  4. Patrice Guest

    I would move the relaod mechanism insise the iframe content to clear any
    ambiguity... you could also explictely address the inner document.

    If you use document in the event of an iframe, is "document" the document
    shown by the iframe or the document in which the iframe is ? Not sure it is
    explcitely defined somewhere (I saw some other marginal behaviors difference
    between IE and Firefox I believe are not in the specification, if I remember
    a browser will "reset" fields as they are in the original source, another as
    they are once startup javascript code ran, not sure it is fully specified at
    w3)...

    --
    Patrice

    <> a écrit dans le message de news:
    ...
    > On 30 Jan., 11:41, "ThatsIT.net.au" <me@thatsit> wrote:
    >> iframe is a element of the parent document, so when you state
    >> 'document.location.reload' you are reloading the parent document. you
    >> need
    >> to add the 'document.location.reload' line to the child page not to the
    >> iframe

    >
    > Thank you ThatsIT.net.au,
    >
    > you mean I should state 'document.location.reload' to the body-
    > element???
    > I tried this, but has no affection on the behavior?!?
    >
    > I want ONLY the iFrame to be reloaded, not the whole Page!
    > Why does it work in Firefox perfectly???
    >
     
    Patrice, Jan 30, 2008
    #4
  5. Guest

    On 30 Jan., 11:54, wrote:
    > On 30 Jan., 11:41, "ThatsIT.net.au" <me@thatsit> wrote:
    >
    > > iframe is a element of the parent document, so when you state
    > > 'document.location.reload' you are reloading the parent document. you need
    > > to add the 'document.location.reload' line to the child page not to the
    > > iframe

    >
    > Thank you ThatsIT.net.au,
    >
    > you mean I should state 'document.location.reload' to the body-
    > element???
    > I tried this, but has no affection on the behavior?!?
    >
    > I want ONLY the iFrame to be reloaded, not the whole Page!
    > Why does it work in Firefox perfectly???


    I got it - the rolad must be stated in the body-element of the source
    file of the iframe :)
     
    , Jan 30, 2008
    #5
  6. <> wrote in message
    news:...
    > On 30 Jan., 11:54, wrote:
    >> On 30 Jan., 11:41, "ThatsIT.net.au" <me@thatsit> wrote:
    >>
    >> > iframe is a element of the parent document, so when you state
    >> > 'document.location.reload' you are reloading the parent document. you
    >> > need
    >> > to add the 'document.location.reload' line to the child page not to the
    >> > iframe

    >>
    >> Thank you ThatsIT.net.au,
    >>
    >> you mean I should state 'document.location.reload' to the body-
    >> element???
    >> I tried this, but has no affection on the behavior?!?
    >>
    >> I want ONLY the iFrame to be reloaded, not the whole Page!
    >> Why does it work in Firefox perfectly???

    >
    > I got it - the rolad must be stated in the body-element of the source
    > file of the iframe :)


    yes the child document

    Why does it have to reload anyhow?

    does it run code on the reload? if so you would be better of using
    "setinterval("doSomthning()",300)" and run a function every so many seconds
     
    ThatsIT.net.au, Jan 30, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. arno
    Replies:
    6
    Views:
    2,349
    John Harrison
    Oct 7, 2004
  2. \A_Michigan_User\
    Replies:
    2
    Views:
    928
    \A_Michigan_User\
    Aug 21, 2006
  3. Replies:
    6
    Views:
    451
    Clever Monkey
    Jul 30, 2007
  4. mi
    Replies:
    4
    Views:
    14,135
    dorayme
    May 21, 2008
  5. Replies:
    2
    Views:
    144
Loading...

Share This Page