On 12/11/06, Van <[EMAIL PROTECTED]> wrote:
> On 12/11/06, Felix Shnir <[EMAIL PROTECTED]> wrote:
> > I'm not sure why you guys find this such a tough issue? The content of the
> > Ajax call is populated into the content of the PWC. That content it
> > requested from the server via an ajax call. Once the data gets loaded
> > through an XHR, you can evaluate scripts. Once scripts are downloaded and
> > XHR switches to status 4, prototype evals and executes scripts (if any are
> > set to execute).
>
> What do you mean by "if any are set to execute?" I admit that I am
> relatively new to using PWC and there is probably something I need to
> do that will seem obvious once I understand it.
I think I found what you are referring to via windows.js code
inspection. Here is function executed for AJAX content requests:
_runAjaxRequest: function(message, parameters, callFunc) {
if (message.options == null)
message.options ={}
Dialog.onCompleteFunc = message.options.onComplete;
Dialog.parameters = parameters;
Dialog.callFunc = callFunc;
message.options.onComplete = Dialog._getAjaxContent;
new Ajax.Request(message.url, message.options);
},
The docs say that you can pass options for an AJAX content request (I
suspect this is inherited behavior for Prototype Ajax object and I'll
find the documentation for it there, did I mention I'm fairly new to
Prototype and AJAX in general :-)), but, I didn't see any
documentation on what those options could be. It may be there and I
missed it. In any case, it looks like I can pass an onComplete
function of my own as one of the options.
I'm going to give this a try and report back.
-Van
--
- Mike "Van" Riper
[EMAIL PROTECTED]
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com