Yii Framework Forum: zii.widgets.jui.CJuiAutoComplete - Yii Framework Forum

Jump to content

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

zii.widgets.jui.CJuiAutoComplete zii.widgets.jui.CJuiAutoComplete ga bisaa.... Rate Topic: -----

#1 User is offline   y_i_i 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 38
  • Joined: 26-March 12

Posted 25 April 2012 - 01:43 AM

hallo para masstaaaaa,, dan smua yiifriends =D
mungkin ada saran atau koreksii yang bisa membantu,,



ini_view yang bersangkutan.....


<div class="row">
		<?php echo $form->labelEx($model,'com_category_id'); ?>
		<?php echo $form->hiddenField($model, 'com_category_id');

					$this->widget('zii.widgets.jui.CJuiAutoComplete', array(
                    'name' => 'Company[com_category_id]',
                    'sourceUrl' => array('Company/test'),
                    'value' => ($model->com_category_id) ? $model->com_category_id : $model->com_category_id,
                    'options' => array(
                        'showAnim' => 'fold',
                        //remove if you dont need to store the id, like i do...
                        'select' => 'js:function(event, ui){ jQuery("#Company_com_category_id").val(ui.item["id"]); }'
                    ),
                    'htmlOptions' => array(
                    //'style' => 'height:20px;'
                    ),
                ));
				?>
		<?php echo $form->error($model,'com_category_id'); ?>
	</div>




controller nyah ini
CompanyController.php


public function actionTest() {
                $criteria = new CDbCriteria;
                $criteria->select = array('com_category_id', 'com_category');
                $criteria->addSearchCondition('com_category', $_GET['term']);
                $criteria->limit = 15;
                $data = CompanyCategory::model()->findAll($criteria);

                $arr = array();
                foreach ($data as $item) {
                        $arr[] = array(
                            'id' => $item->com_category_id,
                            'value' => $item->com_category,
                            'label' => $item->com_category ,
                        );
                }

                echo CJSON::encode($arr);
        }



saya juga sudah menambahkan di public function accessRules()
tapi masih ga juga,, hehehehehhhh
mungkin ada yang kurang atau salah,,

makasiii yh sebelum nyah =]
0

#2 User is offline   xent 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 97
  • Joined: 14-November 10

Posted 25 May 2012 - 09:32 PM

error yang keluar apa mas bro? coba pake firebug firefox ato console bawaan chrome buat liat request/error
xent

My first app: School Information System
Find error? Post here
My Blog
0

#3 User is offline   y_i_i 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 38
  • Joined: 26-March 12

Posted 08 June 2012 - 04:42 AM

kaga ada error nyah tp kaga nampill,, itu knp yh mastaa ?
0

#4 User is offline   mhdrasad 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 199
  • Joined: 20-April 11
  • Location:Bumi Indonesia

Posted 15 June 2012 - 04:41 AM

View Postsaya pemula, on 08 June 2012 - 04:42 AM, said:

kaga ada error nyah tp kaga nampill,, itu knp yh mastaa ?


auto complete nya udah keluar belum tuh?.
Wait For True Concept or Finish it With Coding Concept .
#chadnox
0

#5 User is offline   ahmadroni 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 250
  • Joined: 14-June 09
  • Location:Yogyakarta-Indonesia

Posted 15 June 2012 - 08:47 PM

gimana dah jadi belum gan??
Hospital Cost Management System and
Hospital Management Information System
0

#6 User is offline   y_i_i 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 38
  • Joined: 26-March 12

Posted 19 June 2012 - 05:50 AM

belum,,,, ga tw knp,, ahahahahahh ada saran atw masukkan mungkin mastaa dan suhuu sekaliann hehehehehh
0

#7 User is offline   mbahsomo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 29-March 10

Posted 19 July 2012 - 09:44 PM

Rule nya sudah di setting belum ??
Sugik Puja Kusuma [mbahsomo]
http://sugik.do-event.com
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