Yii Framework Forum: Ajax - Yii Framework Forum

Jump to content

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

Ajax Ajak ajak belajar ajax Rate Topic: -----

#1 User is offline   qikio 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 10-August 12
  • Location:Jakarta

Posted 11 August 2012 - 12:37 AM

Para mastah yii, ada yang punya tutorial tentang ajax?
maklum masih newbie, saya mau mempelajari konsep ajax di yii
0

#2 User is offline   mbahsomo 

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

Posted 12 August 2012 - 10:19 PM

Bisa masuk di sini
http://www.w3schools.com/ajax/default.asp

Semoga membantu
Sugik Puja Kusuma [mbahsomo]
http://sugik.do-event.com
0

#3 User is offline   qikio 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 10-August 12
  • Location:Jakarta

Posted 13 August 2012 - 01:47 AM

sipp, makasih2
saya lihat link di atas ajax untuk php biasa tanpa framework yah?
klu penggunaan ajax di yii-nya bgmn?
0

#4 User is offline   mbahsomo 

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

Posted 15 August 2012 - 12:17 AM

Tidak ada perbedaan menggunakan ajax di yii atau pakai yang lain
Misal kita gunakan fungsi ajax yang ada dalam jquery bisa masuk ke sini :
http://api.jquery.com/jQuery.ajax/

Sugik Puja Kusuma [mbahsomo]
http://sugik.do-event.com
0

#5 User is offline   qikio 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 10-August 12
  • Location:Jakarta

Posted 16 August 2012 - 05:17 AM

oh gitu,,
makasih yaa mbahsomo :D
0

#6 User is offline   mbahsomo 

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

Posted 21 August 2012 - 07:56 PM

Siap mas...
Sugik Puja Kusuma [mbahsomo]
http://sugik.do-event.com
0

#7 User is offline   qikio 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 10-August 12
  • Location:Jakarta

Posted 21 August 2012 - 09:41 PM

tanya lagi ya mas, masih berkaitan ama ajax nih..
saya mau buat disable/enable 2 textfield berdasarkan dropdownlist yang dipilih..

seperti postingan di sini

tapi semua hasilnya jadi disable, knp yah?
0

#8 User is offline   mbahsomo 

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

Posted 24 August 2012 - 10:55 PM

mingkin contoh berikut dapat sedikit mebantu :
var isicbo = $('select[name=name_combo]').val();

if(isicbo == 'a'){
  $('#texta').show();
  $('#textb').hide();
}else{
  $('#texta').hide();
  $('#textb').show();
}



Merdeka
Sugik Puja Kusuma [mbahsomo]
http://sugik.do-event.com
0

#9 User is offline   qikio 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 10-August 12
  • Location:Jakarta

Posted 28 August 2012 - 03:59 AM

View Postmbahsomo, on 24 August 2012 - 10:55 PM, said:

mingkin contoh berikut dapat sedikit mebantu :
var isicbo = $('select[name=name_combo]').val();

if(isicbo == 'a'){
  $('#texta').show();
  $('#textb').hide();
}else{
  $('#texta').hide();
  $('#textb').show();
}


Merdeka


itu ditaro di bagian mana mas?
0

#10 User is offline   mbahsomo 

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

Posted 02 September 2012 - 11:53 PM

<script type="text/javascript">
$('document').ready(function(){
 $("#btnklik").click(function(){
    var isicbo = $('select[name=name_combo]').val();
    if(isicbo == 'a'){
      $('#texta').show();
      $('#textb').hide();
    }else{
      $('#texta').hide();
      $('#textb').show();
    }   
 });
})
</script>
<!-- Misal saya pakai button -->
<input type="button" id="btnklik" />


Catatan jangan lupa memasukkan jquery :
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>


Semoga membantu


Merdeka.
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