June 18, 2011

Enable In-place Editing in Yii Grid

Today someone asked me for help to integrate Jeditable with Yii CGridView. So I thought why not write a little tutorial that can help others as well. In this article I assume that you are comfortable working with Yii; you […]
February 7, 2011

Customize CKEditor

 To add a new font in CKEditor’s font drop down list, add the following lines of code in your config.js   CKEDITOR.editorConfig = function( config ) { config.font_names ="Futura;" + config.font_names; }; CKEDITOR.on( 'instanceCreated', function( e ){ e.editor.addCss("@font-face{font-family:'Futura'; src:url('http://www.your-url.com/font/Futura_Medium.ttf');" ); […]
February 4, 2011

Debug JavaScript in Internet Explorer

Source: http://www.jonathanboutelle.com/how-to-debug-javascript-in-internet-explorer Microsoft Office 2007: The Microsoft Script Editor is normally installed by default with Office 2007, but is not reachable directly from the Start -> All Programs -> Microsoft Office menu.  Instead, you can usually find it by searching for […]
November 28, 2010

iFrame in jQuery UI Dialog

To display iFrame in jQuery UI Dialog, use the following code. <html> <head> <link rel="stylesheet" href="./styles/smoothness/jquery-ui-1.7.2.custom.css" type="text/css" media="screen" /> <script type="text/javascript" src="./scripts/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="./scripts/jquery-ui-1.7.2.custom.min.js"></script> <script type="text/javascript"> $(function() { $('a').click(function(e) { e.preventDefault(); var $this = $(this); var horizontalPadding = 30; […]
October 12, 2010

Control parent window’s location from a popup

Step 1:  In your parent window document add a function function changeURL(url) { if( url == ""){ url = document.location.href; } document.location.href = url; }   Step 2: In popup document call this function to change URL of parent window opener.document.changeURL('http://www.google.com/'); […]
October 12, 2010

Control parent window’s location from an iframe

Step 1:  In your parent window document add a function function changeURL(url) { if( url == ""){ url = document.location.href; } document.location.href = url; }   Step 2: In iframe document call this function to change URL of parent window parent.document.changeURL('http://www.google.com/'); […]
October 4, 2010

Ajax button in CGridView

To add an ajax button to CGridView modify the buttons column  as   'columns' => array( 'id', 'name', array( 'class'=>'CButtonColumn', 'template' => '{view} {update} {delete}', 'buttons'=>array( 'view' => array( 'url'=>'"index.php?r=admin/view&id=".$data->user_id."&m=users"', 'click' => "function (){ $('#viewTab').load($(this).attr('href'));return false; }" ) ), ), […]
October 4, 2010

Display loading div when executing ajax requests

In html add the following div right before closing body tag <div class="ajax-loading"><div></div></div>   Add the following CSS code to stylesheet. (Download loading-bgr.gif and loading.gif) div.ajax-loading{ position: fixed; top: 0; left: 0; height:100%; width:100%; z-index: 9999999; background-image: url('../../images/loading-bgr.gif'); opacity: 0.7; […]
Display loading div when executing ajax requests
This website uses cookies to provide necessary website functionality, improve your experience and analyze our traffic. By using our website, you agree to our Privacy Policy and our cookies usage.
READ MORE