Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > In spite of using iFrame the whole page reloads in IE?!?

Reply
Thread Tools

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

 
 
MaigoSchaeffer@googlemail.com
Guest
Posts: n/a
 
      01-30-2008
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.loc ation.reload()',
3000)" style="z-index: 102; left: 16px; position: absolute; top:
184px"></iframe>
 
Reply With Quote
 
 
 
 
ThatsIT.net.au
Guest
Posts: n/a
 
      01-30-2008
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



<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.loc ation.reload()',
> 3000)" style="z-index: 102; left: 16px; position: absolute; top:
> 184px"></iframe>


 
Reply With Quote
 
 
 
 
MaigoSchaeffer@googlemail.com
Guest
Posts: n/a
 
      01-30-2008
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???

 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      01-30-2008
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

<(E-Mail Removed)> a écrit dans le message de news:
0c1aa4a3-aabb-45a9-b71e-fe3cc2acc761...oglegroups.com...
> 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???
>



 
Reply With Quote
 
MaigoSchaeffer@googlemail.com
Guest
Posts: n/a
 
      01-30-2008
On 30 Jan., 11:54, (E-Mail Removed) 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
 
Reply With Quote
 
ThatsIT.net.au
Guest
Posts: n/a
 
      01-30-2008

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On 30 Jan., 11:54, (E-Mail Removed) 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use an iframe as a link (make the whole iframe clickable) mi HTML 4 05-21-2008 10:13 PM
*WITHOUT* using: ValidateRequest="False" for the whole page (or my whole site).... \A_Michigan_User\ ASP .Net 2 08-21-2006 02:13 PM
iframe reloads whenever it's moved around the DOM sammyleong@gmail.com Javascript 2 01-19-2006 12:22 AM
Biting your nose to spite your face? Gordon Computer Support 1 02-24-2005 10:43 AM
compiler error in spite of correct code arno C++ 6 10-07-2004 12:37 PM



Advertisments