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

M

MaigoSchaeffer

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>
 
T

ThatsIT.net.au

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
 
M

MaigoSchaeffer

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???
 
P

Patrice

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)...
 
M

MaigoSchaeffer

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 :)
 
T

ThatsIT.net.au

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top