Yii Framework Forum: Jquery for dropdown and dynamic file upload - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Jquery for dropdown and dynamic file upload Rate Topic: -----

#1 User is offline   mickeyckm 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 25-March 10

Posted 12 April 2010 - 11:29 AM

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
0

#2 User is offline   Dana 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 203
  • Joined: 18-February 10
  • Location:Florida, USA

Posted 12 April 2010 - 01:11 PM

View Postmickeyckm, on 12 April 2010 - 11:29 AM, said:

...

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 ;)
0

#3 User is offline   mickeyckm 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 25-March 10

Posted 13 April 2010 - 12:06 PM

View PostDana, 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 ;)


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() ?
0

#4 User is offline   Vince. 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 432
  • Joined: 29-December 08
  • Location:Los Angeles,CA

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.
Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image
0

#5 User is offline   horizons 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 18-December 08

Posted 16 April 2010 - 02:57 AM

View Postmickeyckm, 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.
0

#6 User is offline   GSTAR 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,035
  • Joined: 30-October 09
  • Location:UK

Posted 16 April 2010 - 03:48 AM

http://www.yiiframew...MultiFileUpload
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users