Hey everyone,
I began to use Yii to develop my project. It's fairly easy and simple to use. However, I have some uncertainty on how to start on AJAX and javascript. Feel free to answer any of my questions.
Q1. How can I integrate 3rd party JS (i.e. Google Closure/Prototype) and where should I put my files?
Q2. Assuming, I want to use the Jquery on Yii, how can I create a dropdown for "Others" option. In other words, when the user select "Others", a textbox will appear on the side. Just wondering if there is any example of JS that I can learn on how to integrate with Yii.
Q3. Anyone know any example of how I can do dynamic upload of photos?
Thanks in advance.
Cheers,
Mickey
Page 1 of 1
Jquery for dropdown and dynamic file upload
#2
Posted 12 April 2010 - 01:11 PM
mickeyckm, on 12 April 2010 - 11:29 AM, said:
...
Q3. Anyone know any example of how I can do dynamic upload of photos?
...
Q3. Anyone know any example of how I can do dynamic upload of photos?
...
I'm using the EUploadify (http://www.yiiframew...ion/euploadify/) and Image (http://www.yiiframew...xtension/image/) extensions for this purpose. They've worked really well together for me so far.
I'm also using the CFile extension (http://www.yiiframew...xtension/cfile/) to simplify the file handling portions.
Together, I think it's a pretty unstoppable combination
Dana Luther
Sr. Developer at Envisage International
D.H. Luther - Web Design & Development
Dana's Yii Blog
Extensions:
ChildrenRequiredValidator | ESitemap | EStrongPassword | ES3
Sr. Developer at Envisage International
D.H. Luther - Web Design & Development
Dana's Yii Blog
Extensions:
ChildrenRequiredValidator | ESitemap | EStrongPassword | ES3
#3
Posted 13 April 2010 - 12:06 PM
Dana, on 12 April 2010 - 01:11 PM, said:
I'm using the EUploadify (http://www.yiiframew...ion/euploadify/) and Image (http://www.yiiframew...xtension/image/) extensions for this purpose. They've worked really well together for me so far.
I'm also using the CFile extension (http://www.yiiframew...xtension/cfile/) to simplify the file handling portions.
Together, I think it's a pretty unstoppable combination
I'm also using the CFile extension (http://www.yiiframew...xtension/cfile/) to simplify the file handling portions.
Together, I think it's a pretty unstoppable combination
Do you have a sample how it can be setup properly? At the moment, my JS script uploaded but I can't seems to see that the AJAX call is being made from my FireBug. Is there any way I can print out the $files var in the actionUploadedFiles() ?
#4
Posted 13 April 2010 - 01:43 PM
If your using Jquery Ajax function then you can add the success and error attributes to the call to see if that fails it will load those functions and you can either alert or dump the returned values. Another possible way of knowing what's wrong is by logging the data at some point of the script. Those of course can be used if the Firebug does not log the ajax call.
#5
Posted 16 April 2010 - 02:57 AM
mickeyckm, on 13 April 2010 - 12:06 PM, said:
Do you have a sample how it can be setup properly? At the moment, my JS script uploaded but I can't seems to see that the AJAX call is being made from my FireBug. Is there any way I can print out the $files var in the actionUploadedFiles() ?
I guess you know FirePHP?
http://www.firephp.org/
with this you can do output log information into the firebug extension, also form ajax called functions.
Share this topic:
Page 1 of 1

Help
















