Hi,

When you open a window with window.open you are creating a totaly new document
so, you cannot manipulate it from your first window.

Sorry.
----- Original Message ----- From: "mkmanning" <michaell...@gmail.com>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Wednesday, June 24, 2009 10:04 PM
Subject: [jQuery] Re: Accessing window DOM through jQuery Core - can't get it to work



You're opening a blank window; it has no DOM to manipulate (you'd have
to resort to document.write).

On Jun 23, 4:29 pm, ieatsleepsurf <michael.schwart...@gmail.com>
wrote:
Goal: From window A, I want to manipulate the DOM of window B, where
window B is the result of calling window.open().

My attempts are shown below, but Window B is never updated.

winRef = window.open("","Window B");

Try 1:
$(winRef).find("body").append("<div id=container>mr container</div>");

Try 2:
$(winRef).find("body").html("<div id=container>mr container</div>");

Try 3:
$(winRef.document.body).append("<div id=container>mr container</
div>");

Try 4:
$(winRef.document.body).html("<div id=container>mr container</div>");

The jQuery Core doc (http://docs.jquery.com/Core/jQuery#elements)
claims that it can wrap a window object.
Browser is FF2.0

Any tip is greatly appreciated, even if "that's impossible".

Reply via email to