> Because it is using the iframe document as the context to create the new
> element in, so no security violation.
>
> JK
>
> _
>
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Matt Stith
> Sent: Sunday, August 12, 2007 9:21 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: how to use $(html) to create element in another frame?
>
> Hmm.. try:
>
> $("").appendTo($(document.blahblah));
Because it is using the iframe document as the context to create the new
element in, so no security violation.
JK
_
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Stith
Sent: Sunday, August 12, 2007 9:21 PM
To: jquery-en@googlegroups.com
Subject:
Matt, I tried to use
1. $("").appendTo($(window.document.blahblah));
and
2. $("").appendTo($('#divId', window.document));
and
3. var added = window.document.getElementById('divId');
S('HAHAHAHAHAH test').appendTo(added);
The 2nd and 3rd method still works in Safari but not in IE
Hmm.. try:
$("").appendTo($(document.blahblah));
On 8/13/07, Jay W <[EMAIL PROTECTED]> wrote:
>
>
> yeah, I did remove it. Here is the code, I changed the second line
> inside the function according to your instruction. Works perfectly in
> Safari, but got an "invalid argument" error in IE.
>
yeah, I did remove it. Here is the code, I changed the second line
inside the function according to your instruction. Works perfectly in
Safari, but got an "invalid argument" error in IE.
top.addDiv = function (window) {
var doc = window.document;
S('HAHAHAHAHAH test').appendTo(doc.bo
Did you remove the 2nd argument to appendTo? that function only takes 1
argument. Using the context when creating an element is useless too, so
might as well remove the 2nd argument to $
On 8/12/07, Jay W <[EMAIL PROTECTED]> wrote:
>
>
> Well, Matt, it is only working in Safari, (maybe firefox), n
Well, Matt, it is only working in Safari, (maybe firefox), not in IE.
it will get "Invalid Argument" error message. Is createElement in IE
limited only to that document?
On Aug 12, 10:41 pm, Jay W <[EMAIL PROTECTED]> wrote:
> Awesome, I just test it and it worked!!, I need to change
> window.doc
Awesome, I just test it and it worked!!, I need to change
window.document to window.document.body in the appendTo statement.
Thank you so much. You have solved my big problem now. :) I give you 5
stars!
On Aug 12, 5:01 pm, "Matt Stith" <[EMAIL PROTECTED]> wrote:
> You dont need to specify the co
You dont need to specify the context when creating new elements, and
appendTo takes 1 argument, try like this:
$('text').appendTo(window.document);
untested, but that should work
On 8/12/07, Jay W <[EMAIL PROTECTED]> wrote:
>
>
> Thanks. I tried it using $('new div text here',
> window.document)
Thanks. I tried it using $('new div text here',
window.document).appendTo('body'), nothing happened; If I try $
('new div text here', window.document).appendTo('body',
window.document), an "Invalid Argument" error is thrown.
Any suggestion?
Thanks
On Aug 12, 11:43 am, "Matt Stith" <[EMAIL PROTE
You need to add the element to the document via .appendTo, .prependTo, or
one of those similar methods. It isnt added to the DOM just by creating it.
On 8/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I can use $('#id', window.document) to get an existing element from a
> document in a
11 matches
Mail list logo