Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. <?php
  2. echo CHtml::ajaxButton('Submit', 'js:$(this).attr("href")',array(
  3.         'type'=>'GET',
  4.         'update'=>'#testdiv',
  5.        
  6.         'beforeSend' => 'function(){
  7.                          $("#loading").addClass("loading");
  8.                         }',
  9.         'success' => 'function(data){
  10.                         $("#loading").removeClass("loading");  
  11.                         redurl = "http://hq-dev-01"+ this.url;
  12.                         setTimeout(function(){
  13.                                    window.open(redurl,"_new");
  14.                                    },5000);
  15.                      }',
  16.          'error'=>'js:function(data){
  17.                       console.log(data);
  18.                   }',
  19.          ),
  20.         array('href'=>$this->createUrl('/site/pdf/name/billing_patrol_withdeviations/'),
  21.         'id'=>'filter-button' // your actual url
  22.         ));
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement