Yii Framework Forum: Penggunaan Js Autotab Di Yii - Yii Framework Forum

Jump to content

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

Penggunaan Js Autotab Di Yii membuat autotab pada yii dengan js Rate Topic: ***** 1 Votes

#1 User is offline   phra 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 01-July 13

Posted 03 July 2013 - 02:48 AM

gan, maaf kalo pertanyaan ane silly, masih newbie. ane kan lagi buat form, nah didalam formnya ada 3 buah textfied.

echo $form->textField($model,'A',array('size'=>'2'),array('name'=>'a'))." ";
echo $form->textField($model,'B',array('size'=>'4'),array('name'=>'b'))." ";
echo $form->textField($model,'C',array('size'=>'2'),array('name'=>'c'))." ";


nah, saya mau pake autotab.js biar ntar kalo textfield pertama udah penuh, cursor langsung pindah ke textfield kedua.

Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/jquery_autotab.js');


ane cari di mbah gugel, ketemu trus saya buat kayak gini..

<script type="text/javascript">
$(document).ready(function() {
		$('a').autotab_filter('numeric');
		$('b,c').autotab_filter('alpha');
});
</script>


mohon bantuannya ya gan, kali juga bermanfaat buat yg lain :)
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