Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

iframe in parent and child window pointing to same url

5 views
Skip to first unread message

Bhishm

unread,
Feb 2, 2008, 5:06:59 AM2/2/08
to
Hi,

I have a window (192.168.1.223/test.ph) in which one iframe
continuously runs. I open another window from that window
(192.168.1.223/test1.php) which also runs an iframe continuously.

Now the problem is that only one runs at a time the othere window just
hangs.

If I control the child from parent than after refreshing the parent
window the reference is lost.

Can someone please provide some input as how to overcome this iframe
problem.

Early reply will be a lot helpful.

Thanks & regards,
Bhishm

VK

unread,
Feb 3, 2008, 8:23:06 AM2/3/08
to
On Feb 2, 1:06 pm, Bhishm <bhis...@gmail.com> wrote:
> I have a window (192.168.1.223/test.ph) in which one iframe
> continuously runs. I open another window from that window
> (192.168.1.223/test1.php) which also runs an iframe continuously.

It is not clear what do you mean by "running an iframe". From the
further problem description I assume come kind of DOM/Javascript
animation on your page. Is it correct?

> Now the problem is that only one runs at a time the othere window just
> hangs.

Not "hangs" but "waits for the thread being switched on it".
Javascript is a single-threated environment, so no two processes are
going at the same time. If one process is too greedy and never
releases the execution context, the other process just keeps
accumulation timeout calls but cannot move on anywhere.

> If I control the child from parent than after refreshing the parent
> window the reference is lost.

After the page is reloaded, the old Global is released and all new
Global is created. Obviously it has no idea of variable values and
references held by the previous Global.

> Can someone please provide some input as how to overcome this iframe
> problem.

This iframe problems: as there are two of them of different origin
AFAICT. Truly I see nothing here to be a particular Gecko engine
problem. It is all standard Javascript problems, so
comp.lang.javascript would be the place to ask.

--
comp.lang.javascript
Netscape Communications Corp.'s JavaScript language
since January 1996

Al

unread,
Feb 5, 2008, 11:28:12 PM2/5/08
to
VK wrote:
>> Now the problem is that only one runs at a time the othere window just
>> hangs.
>
> Not "hangs" but "waits for the thread being switched on it".
> Javascript is a single-threated environment, so no two processes are
> going at the same time.

Is this true even when running in the browser (i.e. when window is
available)? I would imagine that window.setTimeout/setInterval are
implemented as threads in at least the environments that support it. The
other possibility is using alarms, but I believe most OSes have very few
of these available per process.

Thanks,
-Al-

Bhishm

unread,
Feb 7, 2008, 8:55:40 AM2/7/08
to
Hi,

In case when only one browser runs everything works fine.

Let's say my chat server -
i) opened a browser window with two iframe (a) and (b)
(a) runs in an infinte loop and refreshes (b) on an event. This works
absolutely fine.

ii) Now from this window I opened another window which has two
different frames (c) and (d) referring to different pages but with the
same logic.

Now in the step 2 the infinite iframe just hangs, if I stop the
browser in step(1) it starts, if I now refresh the browser in step (i)
it just hangs, can't do anything. It only works when I stop the
browser in step (ii) using (ESC) or the cross button in browser.

The assumption that other requests will not go is wrong as its
refreshing the static pages in step (2), the problem is happening when
it's opening an infinte frame from the same machine although pointing
to different pages

Thanks
Bhishm

VK

unread,
Feb 9, 2008, 1:34:12 PM2/9/08
to
On Feb 7, 4:55 pm, Bhishm <bhis...@gmail.com> wrote:
> Hi,
>
> In case when only one browser runs everything works fine.
>
> Let's say my chat server -
> i) opened a browser window with two iframe (a) and (b)
> (a) runs in an infinte loop and refreshes (b) on an event. This works
> absolutely fine.
>
> ii) Now from this window I opened another window which has two
> different frames (c) and (d) referring to different pages but with the
> same logic.
>
> Now in the step 2 the infinite iframe just hangs, if I stop the
> browser in step(1) it starts, if I now refresh the browser in step (i)
> it just hangs, can't do anything. It only works when I stop the
> browser in step (ii) using (ESC) or the cross button in browser.

I still don't see what particular has it with Mozilla, so
comp.lang.javascript would be more appropriate, but if you want to
stick with mozilla.dev.tech.javascript then fine. To make a basic
thread sample of your problem you need to define what is "running
infinite iframe" in your case. By the problem description I am
guessing that it is an iframe with come Comet-like trick to keep HTTP
downstream connection open: but I would like to know exactly rather
than guessing.

0 new messages