IMHO...
I would no use $() function in context of other window. I suggest you
to include prototype.js code in iframe' document, and then:
a) use consoleWin.$(consoleWin.document.body).setStyle(...)
or
b) make the whole thing in iframe - not in outer window - run the
JavaScript inside the iframe. If you want to decide when it should
happen in outer window, make an appropriate interface from iframe,
which could be used from outside. Better not operate on other window
(frame) from outside of it.
Good luck.
On Feb 6, 3:10 pm, kashif <[EMAIL PROTECTED]> wrote:
> Hi all,
> First of all I like to thanks prototype team, I use most of the
> javascript libraries but prototype is the best.
>
> I am facing an issue while I am working with iframe element, I am
> trying to extend the body element of an iframe with $ function, its
> working with IE but not with FF & safari the reason would be xpath. IE
> don't support xpath but FF and safari do, I think the solution is
> ownerDocument while directly passing element to $ function. So here is
> the code:
>
> Var consoleWin=document.getElementById('myFrame').contentWindow;
> $(consoleWin.document.body).setStyle({
> Margin:"0px",
> Padding:"0px",
> whiteSpace:"nowrap"
>
> });
>
> This code gives error: setStyle is not a function
> Because you can't extend iframe's body element due to change in
> element context.
>
> Help would be much appreciated!!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---