<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>El Blog del Antonio &#187; Ajax</title>
	<atom:link href="http://www.ramirezcobos.com/category/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ramirezcobos.com</link>
	<description>Programming Web with PHP, CSS, Javascript and ∞</description>
	<lastBuildDate>Wed, 28 Dec 2011 18:26:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Avoiding duplicate script download when using CActiveForm on Ajax calls</title>
		<link>http://www.ramirezcobos.com/2011/09/11/avoiding-duplicate-script-download-when-using-cactiveform-on-ajax-calls/</link>
		<comments>http://www.ramirezcobos.com/2011/09/11/avoiding-duplicate-script-download-when-using-cactiveform-on-ajax-calls/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 08:23:49 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Yii]]></category>
		<category><![CDATA[CActiveForm]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=895</guid>
		<description><![CDATA[
Introduction
Sometimes the active form we wish to use to edit/add a new element on our database is too small and we believe that is much better to use an AJAX&#8217;ed dialog/slide form rather than reloading the page to just display one or two fields.
The only thing required is simple, we just need to  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/2010/10/28/how-to-use-jqueryslidemenu-with-yii%e2%80%99s-cmenu/yii/" rel="attachment wp-att-612"><img src="http://www.ramirezcobos.com/wp-content/uploads/2010/10/Yii.png" alt="Yii Framework" title="Yii Framework" width="160" height="160" class="alignright size-full wp-image-612" /></a><br />
<h3>Introduction</h3>
<p>Sometimes the active form we wish to use to edit/add a new element on our database is too small and we believe that is much better to use an AJAX&#8217;ed dialog/slide form rather than reloading the page to just display one or two fields.</p>
<p>The only thing required is simple, we just need to create a view that will be partially rendered by a call to a controller (using renderPartial) and make sure that we process output -setting to true the parameter on the function. Everything will work as expected but&#8230;</p>
<h3>The issue</h3>
<p>If we open firebug (firefox), or developer tools (chrome), or whatever the tool you use in order to see the XmlHttpRequest object calls and resources downloaded, you will see that every time we do call the controller to display the active form, different Yii &#8220;core JS&#8221; files keeps being downloaded to the client. The JS files downloaded depends on your code but there are at least jquery.js, jquery-ui.js and jquery.yiiactiveform.js.</p>
<h3>The solution</h3>
<p>The solution is a bit tricky but simple. We need to pre-render the jquery.yiiactiveform.js on the view where we are going to place the AJAX functionality (the button that opens the modal dialog or slides/shows a layer with AJAX&#8217;ed form contents). For example, on index.php view file:</p>
<pre class="brush: php; title: ; notranslate">
cs()-&gt;registerCoreScript('yiiactiveform');
</pre>
<p>Now, I assume that you have created your function to display the AJAX&#8217;ed active form and its contents are returned by a call to a controller&#8217;s action that will partially render a view. This is what we have to do in our action:</p>
<pre class="brush: php; title: ; notranslate">
// Just before rendering the view that
// has our activeform
Yii::app()-&gt;clientScript-&gt;corePackages = array();
</pre>
<p>It is very important that we set corePackages to array() instead of null, as setting it to null will make CClientScript to reload the packages.php file (located in framework/web/js/) and we won&#8217;t stop the duplication of the script.</p>
<p>And that&#8217;s it, everything is working as it should.</p>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "pub-7060132287364604";
/* 468x60, creado 16/03/10 */
google_ad_slot = "9029910384";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
</center></p>
<a href="http://twitter.com/?status=RT%20%40%3A%20Avoiding%20duplicate%20script%20download%20when%20using%20CActiveForm%20on%20Ajax%20calls%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2011%2F09%2F11%2Favoiding-duplicate-script-download-when-using-cactiveform-on-ajax-calls%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2011/09/11/avoiding-duplicate-script-download-when-using-cactiveform-on-ajax-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Livebuttons Plugin</title>
		<link>http://www.ramirezcobos.com/2010/12/15/jquery-livebuttons-plugin/</link>
		<comments>http://www.ramirezcobos.com/2010/12/15/jquery-livebuttons-plugin/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 15:45:23 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=716</guid>
		<description><![CDATA[Introduction
I normally develop CMS (control management systems) based on a heavy use of AJAX, and I normally endup writing tones of jQuery functions for different IDs and/or CLASSes. Thinking to create a library that will free me to create the same functions again and again and for different  [...]]]></description>
			<content:encoded><![CDATA[<h2><a rel="attachment wp-att-372" href="http://www.ramirezcobos.com/2010/01/14/jquery-1-4-are-you-ready/picture-121-300x157/"><img class="alignright size-thumbnail wp-image-372" title="jQuery" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-121-300x157-120x120.png" alt="" width="120" height="120" /></a>Introduction</h2>
<p>I normally develop CMS (control management systems) based on a heavy use of AJAX, and I normally endup writing tones of jQuery functions for different IDs and/or CLASSes. Thinking to create a library that will free me to create the same functions again and again and for different classes I thought about this simple plugin. The reason was that if I was to create a new CMS for my beloved Yii framework, I just wanted to have a system where, by setting some meta data into the HTML elements, the client script will smartly know what to do. I didn&#8217;t want to necessary worry about different classes on  my client scripts, I wanted to be just one class.</p>
<p>The idea behind goes a bit further and has something to do with Yii, I want to create extensions that will take care of the correct rendering of a button without having to worry about the client scripts **and** also the same extension could actually call jquery commands easily. I emphasized **and** because Yii already provides an ajaxLink and an ajaxButton but they are not listened to perform client jquery executions and that, as seen in its forums, is causing problems to PHP programmers a lot of times.</p>
<p>Also, I envision an environment where through this, Yii extension designers will be able to create CMS styles, completely different that the one coming from Yii, so Yii users could easily integrate a new layout without even tweaking CSS, or Themes, or Layouts, just their views and by integrating some specialized widgets API, user will be able to program a gallery (for example) with just one line of code on their views. Enough talking, here is the plugin for you to test it and tell me what do you think.</p>
<h2>How to use</h2>
<p>Include jquery and jquery.livebuttons.js on your document&#8217;s head and start monitoring for livebuttons like this:</p>
<pre class="brush: jscript; title: ; notranslate">
//
// .selector is the class name the HTML elements have
$('.selector').livebuttons();
$('.selector').livebuttons( options );
//
// we can have more than one
$('.otherselector').livebuttons( otheroptions );
</pre>
<h2>Options</h2>
<h3>useFirebug</h3>
<p>A useful property for debuggin processes. If set to true all logs will be displayed on firebug console (or chrome).</p>
<pre class="brush: jscript; title: ; notranslate">
var options = {
    useFirebug: true
}
$('.selector').livebuttons( options );
</pre>
<h3>events</h3>
<p>An array of options where to specify the events to monitor. In future releases, we will be able to specify which methods correspond for certain events.</p>
<pre class="brush: jscript; title: ; notranslate">
var options = {
    events: ['click','mouseover'] // not a good practice though *yet*
}
$('.selector').livebuttons( options );
</pre>
<h3>methods</h3>
<p>This is the most interesting part of the plugin. We could implement our own javascript methods to be used with livebuttons. All methods will receive a &#8216;command&#8217; parameter, which is actually the object in the meta-data of the HTML element (see below on the examples provided for default methods).</p>
<pre class="brush: jscript; title: ; notranslate">
var options = {
    methods: {
        alert: function( command ) {
              alert( command.message );
        }
   }
}
$('.selector').livebuttons( options );
</pre>
<p>When designing our own javascript functions to be attached to the plugin, we can access internal parser functions with <strong>this</strong> keyboard. All functions receive a command object and also a reference to the <strong>options</strong> object. This object have a reference to the parser it self and we could easily access parser&#8217;s functions by using <strong>this.parser</strong>.</p>
<h2>The Parser</h2>
<p>If you look at the code inside the plugin, you will see that the parser has a couple of good methods to use:</p>
<h3>stringify</h3>
<p>Converts an object to its JSON representation string</p>
<h3>createIFrame</h3>
<p>Creates an iframe to be used with FORMs with multipart/form-data. So you can easily send files to the server without the need of reloading the page. Check at its code to see its</p>
<h3>removeIFrame</h3>
<p>Removes the iFrame previously created with parser.createIFrame() method.</p>
<h3>parseJSON</h3>
<p>Parses a JSON string and converts it into an object. I know jQuery comes with one, but it throws an error when you include a function into a command object&#8217;s property.</p>
<h2>Default Methods</h2>
<p>You have a couple of methods that already come with the plugin. You can easily override them if required. Here they are:</p>
<h3>ajax</h3>
<p>Its name is self-explanatory. It receives a command object on the following format:</p>
<pre>
{method:'ajax',url:'',data:{},success:function(){},error:function(){}}</pre>
<p><strong>Example of live button markup</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;a class=&quot;livebutton&quot; href=&quot;#&quot;
data-cmd='{&quot;method&quot;:&quot;ajax&quot;,&quot;url&quot;:'http://localhost/',&quot;success&quot;:handleAJAX}&quot;&gt;test ajax&lt;/a&gt;
</pre>
<h3>getscript</h3>
<p>Its calling jQuery&#8217;s getScript method. It receives a command object on the following format:</p>
<pre>
{method:'getscript',url:''}</pre>
<p><strong>Example of live button markup</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;a href=&quot;#&quot; class=&quot;livebutton&quot;
   data-cmd='{method:&quot;getscript&quot;,url:'http://localhost/script.js'}' &gt;test getscript&lt;/a&gt;
</pre>
<h3>jquery</h3>
<p>Its calling any jQuery&#8217;s method. It receives a command object on the following format:</p>
<pre>
{"method":"jquery","jqmethod": "","target":"","arguments":["url",function(){}]}</pre>
<p><strong>Example of live button markup</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;a class=&quot;livebutton&quot; href=&quot;#&quot; data-cmd=&quot;{&quot;method&quot;:&quot;jquery&quot;,&quot;jqmethod&quot;:&quot;load&quot;,&quot;target&quot;:&quot;#layer&quot;,&quot;arguments&quot;:[&quot;url&quot;:&quot;http://localhost&quot;]&quot;&gt;test load jquery function&lt;/a&gt;
</pre>
<h2>Remarks</h2>
<p>As previously said, all functions also receive the command object extracted from the HTML element, but that&#8217;s not all. The parser automatically includes a jquery reference of the HTML element to the command&#8217;s element property.</p>
<pre class="brush: jscript; title: ; notranslate">
var options = {
    methods: {
        alert: function( command ) {
              alert( command.message );
             // do not use $( command.element ) as it would like $( $( element ) )
              command.element.attr('title','I have already been clicked');
        }
   }
}
$('.selector').livebuttons( options );
</pre>
<h2>Demo</h2>
<p>For the sake of having a demo (I will build a better one) the following script will create a live button that can perform jquery &#8216;append&#8217; commands. Please note that when you load new content via AJAX on a page that has the livebuttons plugin that you have successfuly initiated, the plugin will also listen to the specified events to those livebuttons loaded via AJAX.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;html&gt;
&lt;head&gt;
&lt;script src=&quot;path\to\jquery.livebuttons.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
$('.testbuttons').livebuttons();
&lt;body&gt;
&lt;a href=&quot;#&quot; class=&quot;testbuttons&quot;
  data-cmd=&quot;{&quot;method&quot;:&quot;jquery&quot;,&quot;jqmethod&quot;:&quot;append&quot;,&quot;target&quot;:&quot;#container&quot;,&quot;arguments&quot;:[&quot;new content&lt;br&gt;&quot;]}&quot;&gt;Test append&lt;/a&gt;
&lt;div id=&quot;container&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h2>Download</h2>
<p>I seriously would like to know what do you think about this system as, again, I am planning to develop extensions for Yii that will embrace it in order to easy the tasks of PHP programmers with client Javascript. I do use this system to create a new system for a personal project and it is working quite good; but I won&#8217;t dare to create Yii extensions if you think that what I envision is wrong.</p>
<p>If the below link doesn&#8217;t work (it happens normally because you are not registered), please use the following link to download: <a href="http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/upload/jquery.livebuttons.js">jquery.livebuttons.js</a>.</p>
<div style="padding: 10px; text-align: center; background-color: #ffffff; border: 3px solid #dddddd;"><table style="border: 1px solid #CCC;" cellpadding="3" width="100%">
  <tr>
    <td width="35">
      <img src="http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/img/icons/default.gif" alt="http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/img/icons/default.gif">
    </td>
    <td>
      <b>download:</b> <a href="http://www.ramirezcobos.com/?file_id=16">JQuery Livebuttons Plugin</a> <small>(15.33KB)</small><br />
      <b>added:</b> 15/12/2010 <br />
      <b>clicks:</b> 171 <br />
    </td>
  </tr>
</table></div>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "pub-7060132287364604";
/* 468x60, creado 16/03/10 */
google_ad_slot = "9029910384";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
</center></p>
<a href="http://twitter.com/?status=RT%20%40%3A%20jQuery%20Livebuttons%20Plugin%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2010%2F12%2F15%2Fjquery-livebuttons-plugin%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/12/15/jquery-livebuttons-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>jqAutocomplete Extension for Yii</title>
		<link>http://www.ramirezcobos.com/2010/10/21/jqautocomplete-extension-for-yii/</link>
		<comments>http://www.ramirezcobos.com/2010/10/21/jqautocomplete-extension-for-yii/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 16:34:59 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Yii]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=553</guid>
		<description><![CDATA[It was only a matter of time until I try to develop an extension for the Yii Framework and I have chosen the Ajax Powered Autocomplet plugin for JQuery to exercise with this technology.
How to use the Extension
I have included a test within the downloadable package that shows how to implement this  [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-358" href="http://www.ramirezcobos.com/2009/12/29/ajax-powered-autocomplete-plugin-for-jquery-js/autocomplete-3/"><img class="alignright size-full wp-image-358" title="autocomplete" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/autocomplete.gif" alt="" width="240" height="262" /></a>It was only a matter of time until I try to develop an extension for the<a href="http://www.yiiframework.com/forum/index.php?/topic/12499-extension-jqautocomplete/"> Yii Framework</a> and I have chosen the <a href="http://www.ramirezcobos.com/labs/autocomplete-for-jquery-js/">Ajax Powered Autocomplet plugin for JQuery </a>to exercise with this technology.</p>
<h2>How to use the Extension</h2>
<p>I have included a test within the downloadable package that shows how to implement this extension. The test includes a TestController, a view and a test_layout; so I hope this will easy the way for you to check it.</p>
<p>First download and unzip its contents</p>
<ul>
<li>Move jqAutocomplete contents (I said contents) into your application&#8217;s <strong>protected/extension</strong> folder</li>
<li>Copy TestController.php and paste it in (you guessed well) your application&#8217;s <strong>protected/controllers</strong> folder</li>
<li>Move <strong>test</strong> folder (not the contents but the whole folder this time) into your application&#8217;s <strong>protected/views</strong> folder</li>
<li>Finally test_layout.php into your application&#8217;s <strong>protected/layouts</strong> folder</li>
</ul>
<p>That&#8217;s it! Ready for the test. Go to your browser and type http://&lt;replace_with_your_application_url&gt;/index.php?r=test/autocomplete. If everything was good, you will be able to see the first field (JSON TEST) working as an autocomplete.</p>
<p>Please check TestController.php to see an example of AJAX response from the client autocomplete&#8217;s Request calls -and yes, you can also do it from a database result query. Look also at the test view&#8217;s code for an example on how to use the extension.</p>
<p>Download<br />
** If you have problems to download from below; please <a href="http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/upload/jqAutcomplete.zip">try it here</a>.</p>
<p style="text-align: center;"><table style="border: 1px solid #CCC;" cellpadding="3" width="100%">
  <tr>
    <td width="35">
      <img src="http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/img/icons/default.gif" alt="http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/img/icons/default.gif">
    </td>
    <td>
      <b>download:</b> <a href="http://www.ramirezcobos.com/?file_id=12">Ajax Powered AutoComplete Extension for Yii</a> <small>(126.83KB)</small><br />
      <b>added:</b> 20/10/2010 <br />
      <b>clicks:</b> 231 <br />
    </td>
  </tr>
</table></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7060132287364604";
/* 468x60, creado 16/03/10 */
google_ad_slot = "9029910384";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<a href="http://twitter.com/?status=RT%20%40%3A%20jqAutocomplete%20Extension%20for%20Yii%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2010%2F10%2F21%2Fjqautocomplete-extension-for-yii%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/10/21/jqautocomplete-extension-for-yii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bookakar.com Finally!</title>
		<link>http://www.ramirezcobos.com/2010/02/24/bookakar-com-finally/</link>
		<comments>http://www.ramirezcobos.com/2010/02/24/bookakar-com-finally/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 09:03:55 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[On The Web]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=279</guid>
		<description><![CDATA[Finally, after long time of work, the first release of my own company: bookakar.com.
I have implemented lots of concepts widely spread throughout the Internet and I truly hope that they all work. Still, lot of work to do but as soon as I have spare time I will share with all of you guys lots of  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/02/Imagen-5.png"></a><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Imagen-5-300x274.png"></a><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/02/Imagen-5-300x274.png"><img class="alignright size-full wp-image-381" title="Imagen-5-300x274" src="http://www.ramirezcobos.com/wp-content/uploads/2010/02/Imagen-5-300x274.png" alt="" width="300" height="274" /></a><strong><em>Finally, after long time of work, the first release of my own company: <a href="http://www.bookakar.com" target="_blank">bookakar.com</a>. </em></strong></p>
<p>I have implemented lots of concepts widely spread throughout the Internet and I truly hope that they all work. Still, lot of work to do but as soon as I have spare time I will share with all of you guys lots of PHP and JS bits and pieces that I hope we, all together, could improve in order to make a great Open Source Resource for everybody to use.</p>
<p>For example, I have developed a set of PHP classes that help PHP programmers to implement GMaps without the need of Javascript knowledge.</p>
<p>I can wait to share&#8230;</p>
<p>Anyway, any feedback related to my site will be highly appreciated. One more thing and very important: <a href="http://ie6funeral.com/" target="_blank">I DO NOT SUPPORT INTERNET EXPLORER</a> due to its security pitfalls on the bank payment gateway and its sillly way of understanding CSS rendering and styles -and I don&#8217;t mention its JS engine at all.</p>
<p><a href="http://www.bookakar.com" target="_blank">Bookakar.com</a> works only on two Spanish areas: Alicante and Ibiza, but it will grow to other areas very soon.
<a href='http://www.ramirezcobos.com/2010/02/24/bookakar-com-finally/imagen-5-300x274-2/' title='Imagen-5-300x274'><img width="120" height="120" src="http://www.ramirezcobos.com/wp-content/uploads/2010/02/Imagen-5-300x274-120x120.png" class="attachment-thumbnail" alt="Imagen-5-300x274" title="Imagen-5-300x274" /></a>
<a href='http://www.ramirezcobos.com/2010/02/24/bookakar-com-finally/imagen-5-300x274/' title='Imagen-5-300x274'><img width="120" height="120" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Imagen-5-300x274-150x150.png" class="attachment-thumbnail" alt="Imagen-5-300x274" title="Imagen-5-300x274" /></a>
</p>
<a href="http://twitter.com/?status=RT%20%40%3A%20Bookakar.com%20Finally%21%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2010%2F02%2F24%2Fbookakar-com-finally%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/02/24/bookakar-com-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.4 -Are you ready?</title>
		<link>http://www.ramirezcobos.com/2010/01/14/jquery-1-4-are-you-ready/</link>
		<comments>http://www.ramirezcobos.com/2010/01/14/jquery-1-4-are-you-ready/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 15:17:48 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[On The Web]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[News]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=241</guid>
		<description><![CDATA[jQuery lovers, today, 14th of January, the programmers of jQuery celebrate its anniversary releasing a new version of this wonderful library. Better iFrame support, great new shorthands, I don&#8217;t know what to say fellows but I am eager to find out what its new features are capable of.
The jQuery  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/wp-content/uploads/2009/12/Picture-121.png"><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-121-300x157.png"><img class="alignright size-full wp-image-372" title="Picture-121-300x157" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-121-300x157.png" alt="" width="300" height="157" /></a></a>jQuery lovers, today, 14th of January, the programmers of jQuery celebrate its anniversary releasing a new version of this wonderful library. Better iFrame support, great new shorthands, I don&#8217;t know what to say fellows but I am eager to find out what its new features are capable of.</p>
<p>The jQuery programmers not happy with a new release has also created a new  <a href="http://api.jquery.com/" target="_blank">jQuery API site</a>. Check what they have done on their API site <a href="http://jquery14.com/pre-release-1/new-jquery-api-site" target="_blank">here</a>.</p>
<p>John Resig will announce 1.4 release details tomorrow but meanwhile, you can download it and see for yourself.</p>
<ul>
<li><a rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js">Download jQuery 1.4 from Google CDN</a></li>
<li><a rel="nofollow" href="http://code.jquery.com/jquery-1.4.js">Download jQuery 1.4 from Official jQuery website</a></li>
</ul>
<p>Also, if you want to learn more about what is new in jQuery 1.4 then you might find the following resources useful:</p>
<ol>
<li><a rel="nofollow" href="http://jquery14.com/">14 Days of jQuery</a></li>
<li><a rel="nofollow" href="http://blog.jquery.com/">Official jQuery Blog</a></li>
<li><a rel="nofollow" href="http://futurecolors.ru/jquery/">jQuery 1.4 Cheatsheet</a></li>
<li><a rel="nofollow" href="http://twitter.com/jquery">jQuery on Tweeter</a></li>
</ol>
<p>Check what is new or changed on this new release <a href="http://api.jquery.com/category/version/1.4/" target="_blank">here</a>.</p>
<p>Happy birthday jQuery! Thanks for the good work!<br />
</p>
<a href="http://twitter.com/?status=RT%20%40%3A%20jQuery%201.4%20-Are%20you%20ready%3F%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2010%2F01%2F14%2Fjquery-1-4-are-you-ready%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/01/14/jquery-1-4-are-you-ready/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax Powered Autocomplete Plugin for JQuery.js</title>
		<link>http://www.ramirezcobos.com/2009/12/29/ajax-powered-autocomplete-plugin-for-jquery-js/</link>
		<comments>http://www.ramirezcobos.com/2009/12/29/ajax-powered-autocomplete-plugin-for-jquery-js/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 10:44:23 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Autocomplete]]></category>
		<category><![CDATA[Plugin]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=134</guid>
		<description><![CDATA[I am glad to announce the launch of the successfull Ajax Powered Autocomplete for Prototype.js now as a plugin for JQuery. No much to say&#8230; if any of you want to have a look at this piece of code you can check it here.
Any feedback is highly appreciated.
Tweet this!]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/wp-content/uploads/2009/12/autocomplete1.gif"><img class="alignright size-full wp-image-46" style="border: 3px solid #ddd; margin: 5px;" title="autocomplete" src="http://www.ramirezcobos.com/wp-content/uploads/2009/12/autocomplete1.gif" alt="" width="240" height="262" /></a>I am glad to announce the launch of the successfull Ajax Powered Autocomplete for Prototype.js now as a plugin for JQuery. No much to say&#8230; if any of you want to have a look at this piece of code <a href="http://www.ramirezcobos.com/labs/autocomplete-for-jquery-js/">you can check it here</a>.</p>
<p>Any feedback is highly appreciated.</p>
<p><center><br />
<br />
</center></p>
<a href="http://twitter.com/?status=RT%20%40%3A%20Ajax%20Powered%20Autocomplete%20Plugin%20for%20JQuery.js%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2009%2F12%2F29%2Fajax-powered-autocomplete-plugin-for-jquery-js%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2009/12/29/ajax-powered-autocomplete-plugin-for-jquery-js/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ajax Load -Ajax Loading GIF Generator</title>
		<link>http://www.ramirezcobos.com/2009/12/18/ajax-load-ajax-loading-gif-generator/</link>
		<comments>http://www.ramirezcobos.com/2009/12/18/ajax-load-ajax-loading-gif-generator/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 15:49:08 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[On The Web]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=92</guid>
		<description><![CDATA[Who of those of you that use ajax on your projects aren&#8217;t looking around the web to find the perfect &#8216;loading please wait&#8217; GIF for your brand new web application or site? I have to confess that I was one of them. I am not a designer, I can program any web application in a matter of days but when it  [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-94" title="Ajax Load - AJax Loading GIF Generator" src="http://www.ramirezcobos.com/wp-content/uploads/2009/12/Picture-6-300x269.png" alt="Ajax Load - AJax Loading GIF Generator" width="300" height="269" style="border:3px solid #ddd;margin:5px" />Who of those of you that use ajax on your projects aren&#8217;t looking around the web to find the perfect &#8216;loading please wait&#8217; GIF for your brand new web application or site? I have to confess that I was one of them. I am not a designer, I can program any web application in a matter of days but when it comes to design&#8230; puff&#8230; It is the reason why I am always crawling the web for &#8216;inspiration&#8217;.</p>
<p>One of those days crawling I found an online tool created by <a href="http://www.kath.fr/" target="_blank">kath</a> called <a href="http://ajaxload.info/" target="_blank">Ajax Load &#8211; Ajax Loading GIF Generator.</a> There you don&#8217;t need to worry if you know how to design or not, this simple but very useful tool allows you to select the type of design you want for your ajax loading gif, the foreground and background colors and voilá, your ajax loading gif is ready to download.</p>
<p><img class="aligncenter size-full wp-image-93" style="border:3px solid #ddd;margin:5px" title="Dropdown List" src="http://www.ramirezcobos.com/wp-content/uploads/2009/12/Picture-7.png" alt="Dropdown List" width="476" height="242" /></p>
<p>For those, like me, without a clue about designing there it is, the <a href="http://ajaxload.info/" target="_blank">Ajax Load &#8211; Ajax Loading GIF Generator</a>.</p>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "pub-7060132287364604";
/* 468x60, creado 16/03/10 */
google_ad_slot = "9029910384";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
</center></p>
<a href="http://twitter.com/?status=RT%20%40%3A%20Ajax%20Load%20-Ajax%20Loading%20GIF%20Generator%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2009%2F12%2F18%2Fajax-load-ajax-loading-gif-generator%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2009/12/18/ajax-load-ajax-loading-gif-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Gallery via Ajax using JQuery Tools</title>
		<link>http://www.ramirezcobos.com/2009/12/14/image-gallery-via-ajax-using-jquery-tools/</link>
		<comments>http://www.ramirezcobos.com/2009/12/14/image-gallery-via-ajax-using-jquery-tools/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 11:35:28 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[On The Web]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Utilities]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=72</guid>
		<description><![CDATA[The other day I was having a bit of headache trying to find the best way to display a gallery via Ajax for one of my projects. There are tons of great lightbox type scripts out there (I even have one: lightboxXL) but none of them truly suit my needs as most of them, including mine, are creating the  [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ramirezcobos.com/wp-content/uploads/2009/12/overlay-300x143.jpg" alt="overlay" title="overlay" width="300" height="143" class="alignright size-medium wp-image-74" style="border:3px solid #ddd"/>The other day I was having a bit of headache trying to find the best way to display a gallery via Ajax for one of my projects. There are tons of great lightbox type scripts out there (I even have one: lightboxXL) but none of them truly suit my needs as most of them, including mine, are creating the image galleries on DOM load, or on Document load, or on Window load&#8230; none of them allowed me to make use of Ajax and I certainly didn&#8217;t want to rewrite the code of anybody.</p>
<p>Suddenly, searching the web I found the <a href="http://flowplayer.org/tools/demos/overlay/index.html" target="_blank">OVERLAY</a> object from <a href="http://flowplayer.org/tools/index.html" target="_blank">JQuery Tools</a>. This library offers a set of objects that extend the functionality of JQuery, it contains six of the most useful JavaScript tools available for today&#8217;s website. The beauty of this library is that all of these tools can be used together, extended, configured and styled. In the end, you can have hundreds of different widgets and new personal ways of using the library.</p>
<p>This is how I used it to create the Image Gallery via Ajax:<br />
<strong><br />
Insertion of Libraries</strong></p>
<p>First we must include the library on the HEAD section of the page (JQuery Tools have a compressed version of its tools and latest version of JQuery library)</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;!-- Full version of jQuery Tools + jQuery 1.3.2 --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.tools.min.js&quot;&gt;&lt;/script&gt;
</pre>
<p><strong>CSS Coding</strong></p>
<p>This is where we are going to apply styles to our overlay.</p>
<pre class="brush: css; title: ; notranslate">
/* scrollable should not disable gallery navigation */
#gallery .disabled {
    visibility:visible !important;
}
#gallery .inactive {
    visibility:hidden !important;
}
/* the overlayed element */
.simple_overlay {
    /* must be initially hidden */
    display:none;
    /* place overlay on top of other elements */
    z-index:10000;
    /* styling */
    background-color:#333;
    width:675px;
    min-height:200px;
    border:1px solid #666;
    /* CSS3 styling for latest browsers */
    -moz-box-shadow:0 0 90px 5px #000;
    -webkit-box-shadow: 0 0 90px #000;
}
/* close button positioned on upper right corner */
.simple_overlay .close {
    background-image:url(images/overlay/close.png);
    position:absolute;
    right:-15px;
    top:-15px;
    cursor:pointer;
    height:35px;
    width:35px;
}
/* styling for elements inside overlay */
.simple_overlay .details {
    position:absolute;
    top:15px;
    right:15px;
    font-size:11px;
    color:#fff;
    width:150px;
}
.simple_overlay .details h3 {
    color:#aba;
    font-size:15px;
    margin:0 0 -10px 0;
}
/* &quot;next image&quot; and &quot;prev image&quot; links */
.next, .prev {
	/* absolute positioning relative to the overlay */
	position:absolute;
	top:40%;
	border:1px solid #666;
	cursor:pointer;
	display:block;
	padding:10px 20px;
	color:#fff;
	font-size:11px;
	/* upcoming CSS3 features */
	-moz-border-radius:5px;
	-webkit-border-radius:5px;
}
.prev {
	left:0;
	border-left:0;
	-moz-border-radius-topleft:0;
	-moz-border-radius-bottomleft:0;
	-webkit-border-bottom-left-radius:0;
	-webkit-border-top-left-radius:0;
}
.next {
	right:0;
	border-right:0;
	-moz-border-radius-topright:0;
	-moz-border-radius-bottomright:0;
	-webkit-border-bottom-right-radius:0;
	-webkit-border-top-right-radius:0;
}
.next:hover, .prev:hover {
	text-decoration:underline;
	background-color:#000;
}
/* when there is no next or previous link available this class is added */
.disabled {
	visibility:hidden;
}
/* the &quot;information box&quot; */
.info {
	position:absolute;
	bottom:0;
	left:0;
	padding:10px 15px;
	color:#fff;
	font-size:11px;
	border-top:1px solid #666;
}
.info strong {
	display:block;
}
/* progress indicator (animated gif). should be initially hidden */
.progress {
	position:absolute;
	top:45%;
	left:50%;
	display:none;
}
/* everybody should know about RGBA colors. */
.next, .prev, .info {
	background:#333 !important;
	background:rgba(0, 0, 0, 0.6) url(images/h80.png) repeat-x;
}
</pre>
<p><strong>HTML Coding</strong></p>
<p>Now the HTML holder</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- overlay element --&gt;
&lt;div class=&quot;simple_overlay&quot; id=&quot;gallery&quot;&gt;
&lt;!-- &quot;previous image&quot; action --&gt;
&lt;a class=&quot;prev&quot;&gt;prev&lt;/a&gt;
&lt;!-- &quot;next image&quot; action --&gt;
&lt;a class=&quot;next&quot;&gt;next&lt;/a&gt;
&lt;!-- image information --&gt;
&lt;div class=&quot;info&quot;&gt;&lt;/div&gt;
&lt;!-- load indicator (animated gif) --&gt;
&lt;img class=&quot;progress&quot; src=&quot;images/ajax-loader.gif&quot; /&gt;
&lt;!-- end of overlay element --&gt;
&lt;/div&gt;
</pre>
<p><strong>PHP Response</strong></p>
<p>By now, you should already know how to do Ajax calls using JQuery, if you don&#8217;t please review it on JQuery&#8217;s site. What we are going to check is how is the PHP response in order to make our Image Gallery work after an Ajax call.</p>
<pre class="brush: php; title: ; notranslate">
// ************************************
// Scenario: An ajax call to this PHP script was done and
// a POST variable has been sent in order to fill $pics from
// a database.
//
// pics == array of pictures
// ************************************
// loop the array
foreach($pics as $pic)
{
	// check the class attribute --&gt; ibox
	// $pic is also an object with certain properties in this case
       $html .= '&lt;div class=&quot;pic&quot;&gt;
			&lt;a href=&quot;'.$pic-&gt;imgPath.$pic-&gt;strName.'&quot; class=&quot;ibox&quot; title=&quot;'.$pic-&gt;strName.'&quot;&gt;
			&lt;img src=&quot;'.$pic-&gt;imgPath.$pic-&gt;strName.'&quot; width=&quot;50&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
			&lt;/div&gt;';
}
//
// here I create the necessary javascript code to load the OVERLAY object of JQuery Tools
// please check the 'ibox' call
//
$html .= '
     &lt;script type=&quot;text/javascript&quot;&gt;
     //&lt;![CDATA[
     $('.ibox').overlay({
    		target: '#gallery',
    		expose: '#f1f1f1'
		}).gallery({
		speed: 800 });
     //]]&gt;&lt;/script&gt;';
//
// echo response
//
echo $html;
</pre>
<p>And that&#8217;s it, once your image gallery is loaded whereever you wish to from an Ajax call, the latest javascript will fire and create the Image Gallery.</p>
<p><strong>Addendum</strong></p>
<p>I don&#8217;t want to say that there aren&#8217;t other ways to do exactly what I did in this post. I just share what was, in my case, the solution that I implemented into my project and it worked. I will go deeper into JQuery Tools in future posts. Nevertheless, hope you find this post useful.</p>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "pub-7060132287364604";
/* 468x60, creado 16/03/10 */
google_ad_slot = "9029910384";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
</center></p>
<a href="http://twitter.com/?status=RT%20%40%3A%20Image%20Gallery%20via%20Ajax%20using%20JQuery%20Tools%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2009%2F12%2F14%2Fimage-gallery-via-ajax-using-jquery-tools%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2009/12/14/image-gallery-via-ajax-using-jquery-tools/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Internet Video Search Engine</title>
		<link>http://www.ramirezcobos.com/2009/12/09/internet-video-search-engine/</link>
		<comments>http://www.ramirezcobos.com/2009/12/09/internet-video-search-engine/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 21:40:38 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=55</guid>
		<description><![CDATA[In order to prove  the efficiency of my lightboxXL object and how it could be used, I created ANTCUT.COM.There you can search for videos that match your search among most of the internet video providers.
It was created as a demo but if anybody thinks that it could be used for something else than  [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border:3px solid #ddd;margin:5px" class="alignright size-full wp-image-56" title="antcut.com" src="http://www.ramirezcobos.com/wp-content/uploads/2009/12/Picture-10.png" alt="Picture 10" width="320" height="197" />In order to prove  the efficiency of my <a href="http://www.ramirezcobos.com/labs/lightboxxl-for-prototype/">lightboxXL</a> object and how it could be used, I created <a href="http://www.antcut.com">ANTCUT.COM</a>.There you can search for videos that match your search among most of the internet video providers.</p>
<p>It was created as a demo but if anybody thinks that it could be used for something else than that let me know. Maybe I am not the only one who find this feature useful&#8230;</p>
<p><center><br />
<script type="text/javascript"><!--
google_ad_client = "pub-7060132287364604";
/* 468x60, creado 16/03/10 */
google_ad_slot = "9029910384";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
</center></p>
<a href="http://twitter.com/?status=RT%20%40%3A%20Internet%20Video%20Search%20Engine%20-%20El%20Blog%20del%20Antonio%20http%3A%2F%2Fwww.ramirezcobos.com%2F2009%2F12%2F09%2Finternet-video-search-engine%2F" class="tweet-this" ><img src="http://www.ramirezcobos.com/wp-content/plugins/simple-tweet/img/tweet.gif" title="Tweet this!" alt="Tweet this!" />Tweet this!</a>]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2009/12/09/internet-video-search-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.ramirezcobos.com @ 2012-02-06 17:32:10 by W3 Total Cache -->
