> does it help you ?
> http://groups.google.com/group/cake-php/browse_thread/thread/1742022f...

I'm not sure... I don't think I'm looking for a remote call on onload
of the entire page, I just need a way to initialize the uploader after
a user presses an $ajax->link.

So I have a /posts/index/, and if a user presses the $ajax->link, a
div on the page is updated to display the uploader on that page (/
files/upload/).

The javascript configuration of the uploader is by default triggered
by window.onload, but because this time it's an ajax call, there is no
window.onload behaviour I can use to initialize the uploader.

I've tried Mandy's example, but for some reason the function in
init.js isn't triggered.

When I do something like this:
<s cript>
alert('loaded');
</s cript>

I DO see the alert after the ajax call is done.

Strange...



On 2 apr, 12:29, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> does it help you ?
>
> http://groups.google.com/group/cake-php/browse_thread/thread/1742022f...
>
> On Apr 2, 7:11 am, "Mandy" <[EMAIL PROTECTED]> wrote:
>
> > You can just give a call to the function at the bottom of your ajax'd
> > response like this -
>
> > <s cript>
> > init_uploader();
> > </s cript>
>
> > Just make sure evalScripts is set to 'true' while doing the ajax call
> > - it is used for evaluating the script received in an ajax response.
>
> > Thanks,
> > Mandy.http://mandysingh.blogspot.com
>
> > On Apr 1, 8:03 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > > I just built my own swfupload script using the new article in the
> > > bakery:
>
> > >http://bakery.cakephp.org/articles/view/296
>
> > > It's a great article, and the uploader works fantastically!
> > > Everybody's talking about "ajax upload", but this is the first good
> > > implementation I've seen.
>
> > > One question though:
>
> > > The uploader is in my posts/add/ view, which I load into another view
> > > through ajax (only after the user presses the "add" button). In the
> > > article the uploader is initialized at window.onload using this line:
>
> > > window.onload = init_uploader;
>
> > > But of course this doesn't work with ajax.
>
> > > How can I initialize the uploader once the ajax-call is made?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to