Herry

Broken Images issue in browser

When not get any images from Db or Folder then display broken images in page. if we not display that broken images on page then use below code…. <img src=“someimage.jpg” onerror=“this.style.display=‘none’;“ />Read more …
Herry

Page redirect issue with link

When click on <a href=””> link then page should redirect on another page but when we don’t want redirect page on click <a href=””> then use below code : $(‘.class a’, ‘click’, function(e) { e.preventDefault(); { Your code } });  Read more …
Herry

Cakephp Pagination Issue

When Set Pagination in Cakephp we can use costume url for the pagination path. By default path is : page url   $this->renderElement( ‘cake_pagination’, array( ‘model’ => $model, ‘paging’ => array_merge( $this->params[‘paging’][$model], array( ‘url’ => array(‘controller’ => ‘Pages’, ‘action’ => ‘all_messages_data’), )), ));Read more …
Herry

Use of controller method outside of controller

I have set a cronjob and use users controller method in cronjob basically its not possible direct use of any controller method outside of controller. so,it solution is first import your controller in cronfile like as :  App::import(‘Controller’, ‘Users’); Second make its object : $Controller->User = new UsersController(); Third call...Read more …