There is a specific requirement on my pages.
It contains two frames which are named control frame and content
frame,
and scripts are running on control frame and controls the content
frame to react.
jQuery is included in control frame but content frame - content frame
contains no jQuery sources.

My target browser is Firefox 3.5,
and from Mozilla's document I've confirmed Firefox do supports
onmouseup event on window object.
I want to attach content frame window's onmouseup event to monitor all
mouseup events raised on its elements,
and I use
$(top.contentFrame.window).bind('mouseup', {},
   function(event) { alert("event"); }
);
to do so and it fails in Firefox.
When I moved the same codes to content frame, and includes jquery.js,
it do works.
I traced the problem and found that if you pass a window element here,
jQuery always replaces it with the current window object,
which is the window object of content frame in this situation but not
the intent content frame's one.

                // For whatever reason, IE has trouble passing the window object
                // around, causing it to be cloned in the process
                if ( elem.setInterval && elem != window )
                        elem = window;

How do I resolve this problem and get what I want?
Thanks.

Reply via email to