Saturday, July 31, 2010

RE: file uploading. problems with ajax and jquery

Render an element containing the image uploaded.

-----Original Message-----
From: Tomfox Wiranata [mailto:tomfox.wiranata@gmail.com]
Sent: July-31-10 2:54 PM
To: CakePHP
Subject: Re: file uploading. problems with ajax and jquery

ok i found the problem:

it has to be
<script type="text/javascript" src="../js/ajaxupload.js"></script>

not
<script type="text/javascript" src="js/ajaxupload.js"></script>

but i get another one:

i see the "...loading" text for the web 2.0 feeling, BUT:

a) the image wont be uploaded. so i guess my function in controller is
not called. and
b) because i have
$this->redirect(array('controller' => 'users', 'action' =>
'editprofile'));
in my called function i get to see the whole site in the div,
where the uploaded pic should appear.

but if i delete the redirect, cake asks for a view. makes sense
though. what do i need to change, that the whole site wont be shown in
this div?

thx :)

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at
http://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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: