well I used jquery before to just reload that DIV after a file got
uploaded and it worked fine. In the end I just needed to render the
result.
but when I added an ajax link in that rendered view to delete a file,
It didnt work. AJAX just would not work. as soon as I abandoned jquery
and just used AJAX->link it worked and I just had to make the file
upload work with AJAX too.....

this seems hopeless.....??

On 13 Sep., 10:15, Tomfox Wiranata <[email protected]> wrote:
> so there is no way to pass the file data from my form to my controller
> function???
> because the controller function actually uploads the file, it just
> needs the data....
>
> that would suck...
>
> On 13 Sep., 02:00, cricket <[email protected]> wrote:
>
> > Files cannot be upload with AJAX. The only way to do it without
> > reloading the page is to set the target of the form to a hidden
> > iframe, then fetch the response from there.
>
> > On Sun, Sep 12, 2010 at 11:26 AM, Tomfox Wiranata
>
> > <[email protected]> wrote:
> > > Hi everyone,
>
> > > I use a form to upload files and currently i do this with jquery to
> > > simulate ajax, so if I want to pass the file data to my jquery
> > > function I do this:
>
> > > <div class="submit"><button onClick="refreshattachments(this.form)"
> > > type="button">Upload</button></div>
>
> > > But I want to switch to AJAX and I dont know how to pass the form data
> > > within an ajax link:
>
> > > echo $form->create('Links',
> > > array('name'=>'uploadAttachmentsForm','id'=>'uploadAttachmentsForm','type'=>'file'));
> > > echo $form->file('Links');
>
> > > echo $ajax->link('Upload', '/links/processattachment'.this.form,
> > >                                 array('update' => 'attachments_content')
> > >                                );
> > > echo $form->end();
>
> > > aware that "$ajax->link('Upload', '/links/
> > > processattachment'.this.form," is far away from right I stil gave it a
> > > shot.
>
> > > Can someone help me? Thank you. I appreciate it.
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > > with their CakePHP related questions.
>
> > > You received this message because you are subscribed to the Google Groups 
> > > "CakePHP" 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 
> > > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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