Hello,

I believe this is possible by first creating a reference to the element,
extending it and then modifying it:
// get the element and extend it with prototype's $() method:
var element = $(top.document.getElementById('my_element'));
// now apply the effect to the element:
new Effect.Opacity(element, { from: 1, to: 0.4, duration: 0.7});

I don't have the time to test it right now but I think this should work.

var element = top.document.getElementById('id');

On Thu, May 27, 2010 at 1:32 PM, oSerX <[email protected]> wrote:

> Hello,
>
> I have a main php file including 4 iframes. From inside of one iframe
> I want to access an ID element defined in the main php file.
>
> using Javascript I can use
>
> "top.document.getElementByID('ID_of_the_element_I_want_to_acces').style.opacity=
> "
>
> , but ... I want to use scriptaculous effects to do EffectOpacity on
> this element outside the current iframe ...
>
> i cannot do " .. onclick="new Effect.Opacity('element ID', { from: 1,
> to: 0.4, duration: 0.7});"
>
> please help me ...  how can I make Effect.Opacity to point to an
> element in the main php file ??
>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<prototype-scriptaculous%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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-scriptaculous?hl=en.

Reply via email to