Scroll to A specific Element In javascript

<script type="text/javascript">// <![CDATA[
function scrollTo(id) {     var selectId = document.getElementById(id);     selectId.scrollIntoView(true);     }
// ]]></script>

Go there



Yii Ajax button for confirm and before sending text

i am back again. today um gonna show you how to make a button for cofirm or before sending text effect in AJAX in the Yii application. you need to write code in only two section which is “controller” and the “view” …

// paste it on the controller class

public function actionResetPassword($user_id)
// additional code can be here


// and paste it in the View

echo "
echo CHtml::ajaxButton('Reset Password', // the link body (it will NOT be HTML-encoded.)
array('resetPassword','id'=>$model->user_id), // this is the URL for the request of AJAX . If this is not nonempty, it will be thinking as current url.
'beforeSend' => 'function() {
$("#resetPass").html("please wait......");
'complete' => 'function() {

'class'=>'btn btn-info',
'confirm'=>Yii::t('admin','Are you want to Reset Password ?'),

echo "

" ?>

Happy Coding !!!