Showing posts with label Yii Ajax. Show all posts
Showing posts with label Yii Ajax. Show all posts

Thursday, July 26, 2012

Ajax Submit Button in Yii

This source to Apply the AjaxSubmitButton instead of submitButton in yii


Yii CHtml ajaxSubmitButton I added ajaxsubmitbutton instead of submitButton. When i click the submit button I will send form data through ajax post and i will do controller work for insert and i render the listdata using CHtml::listData() and i will set the response value to eventlist dropdownlist. So I am updating the event list without page refresh using ajaxsubmitbutton of yii
For More Details www.bsourcecode.com
Read More...

Monday, July 23, 2012

insert data into Dropdownlist by ajax request in yii

In view.php
-----------------


In controller.php
-----------------

Read More...

Thursday, July 19, 2012

Yii ajax request and json response array


In view.php


In Controller.php

Read More...

Tuesday, May 22, 2012

ajax request with json in yii

Ajax request using Yii ajaxButton

json mixing format like dot,associative array etc In view.php -------------- <?php echo CHtml::ajaxButton('User List',CController::createUrl('user/active'), array( 'type' => 'POST', 'dataType'=>'json', 'data'=>"js:callData()", Call JS Function OR Give datastring 'url'=> 'user/active', 'success'=>"function(response){ alert(response); if(response!=''){ alert(response.url); if(response['message']!=''){ alert(response['message']); } if(response['url']!=''){ window.location=response['url']; } } }", ),array('id'=>'activebtn') ); ?> In Controller .php ------------------ public function actionactive() { $returnmessage['message']=$successmessage; $returnmessage['url']="url"; echo json_encode($returnmessage); }
Read More...

Checkbox value in ajax request of yii

This is one of the way to send data dynamicallay in ajaxbutton request of yii.
When you click on ajaxbutton We will get the selected checkbox value and send this via ajax

Read More...

Ajax in Yii

In view.php


In controller.php


For More Details www.bsourcecode.com
Read More...