It worked for calling the functions/effects, but it generates a problem:
example:
var Effect = parent.Effect;
var Ajax = parent.Ajax;
function getImages(element)
{
parent.updateSize('776', '420', '30');
new Ajax.Updater(element, 'ajax_modules.php?request=images',
{onComplete:function(){ new Effect.Appear(element);}, asynchronous: true });
new Effect.Fade('showLink', {duration: 1.0});
new Effect.Appear('hideLink', {delay: 1, duration: 2.0});
}
it calls the Ajax function, but stops at element, because element is inside
the window and Ajax is in the parent... any ideas?
Issachar
On 11/28/06, Armeanu, Christian <[EMAIL PROTECTED]> wrote:
I can't verify this right now, but something like this should do in terms
of copying over styles and effects from the parent context:
Var Effect = parent.Effect; // copy the effect object as provided when
loading effects.js, please see the scriptaculous files for other
stuff/dependencies you may need to copy for this to work.
myelement.setStyle( parent.elementxyz.getStyle() );
Chris
------------------------------
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Issachar Brooks
*Sent:* Tuesday, November 28, 2006 10:21 AM
*To:* [email protected]
*Subject:* Re: [Javawin] window resize
Anyone have any help on how to call the styles and classes from the
parent? I am a javascript novice....
Issachar
On 11/28/06, *Armeanu, Christian* <[EMAIL PROTECTED]> wrote:
That is because these classes only exist in the parent context. However,
you could copy them over to your current context I guess…
Chris
------------------------------
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Issachar Brooks
*Sent:* Tuesday, November 28, 2006 9:53 AM
*To:* [email protected]
*Subject:* Re: [Javawin] window resize
Hi Chris,
Styles are the "least" of the problems in his case, altough I haven't
quite figured out how to call them from the parent. My biggest problem is
how to call a scriptaculous Effect and an Ajax.Updater from the parent,
then have them affect objects within the window without writing
parent.Windows.getWindow('30').etc.etc. every time..., but maybe that's
what I have to do...
Thanks
Issachar
On 11/28/06, *Armeanu, Christian* < [EMAIL PROTECTED]> wrote:
By opening a window with a URL you are creating an iframe- this means a
new context. So, using the parent is the way to go, unless you'd like to
reload everything. But where's the problem in copying the style and
whatever else from the parent?
Chris
------------------------------
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Issachar Brooks
*Sent:* Tuesday, November 28, 2006 9:37 AM
*To:* [email protected]
*Subject:* Re: [Javawin] window resize
Hi Felix or anyone that might be able to help.
In this window, I am loading a url within my own site. Within this url I
would like to be able to use the css styles and loaded javascript files of
the parent. For example, in the parent I have loaded PWC, Scriptaculous, and
Rico and Prototype(of course), plus my stylesheet and would like to be able
to make ajax requests, round corners(with rico), effects (scriptaculous)
inside my window without having to reload the js files within the URL that
is loaded in my window, as this would realy cut down on the efficiency of my
website. Is there a way to do this?
Of course, I could use the parent. object for some things, but it
seems that just makes things quite complicated, calling parent everywhere.
Please enlighten me...
Thanks alot...
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com