<?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>dMarkWeb-Web Design Company</title>
	<atom:link href="http://www.dmarkweb.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dmarkweb.com</link>
	<description></description>
	<lastBuildDate>Mon, 09 Jan 2012 09:04:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Magento Issue &#8211; Internal Server Error 500</title>
		<link>http://www.dmarkweb.com/magento-issue-internal-server-error-500.html</link>
		<comments>http://www.dmarkweb.com/magento-issue-internal-server-error-500.html#comments</comments>
		<pubDate>Mon, 09 Jan 2012 09:04:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[500 internal server error magento]]></category>
		<category><![CDATA[Internal server error 500 in magento]]></category>
		<category><![CDATA[Internal Server Error magento]]></category>
		<category><![CDATA[Magento 500 internal server error]]></category>
		<category><![CDATA[Magento fresh upload 500 internal error]]></category>
		<category><![CDATA[Magento Internal Server Error]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=333</guid>
		<description><![CDATA[Today we will find out a solution troubleshooting Internal Server Error with Magento Store in any case for any reason. Possible Reason/Solutions =========================== Some might have this problem with their fresh Magento Installation or a Custom Magento Store, some have this problem with their exsiting installtion that is running fine for a long time. Sometime, [...]]]></description>
			<content:encoded><![CDATA[<p>Today we will find out a solution troubleshooting Internal Server Error with Magento Store in any case for any reason.</p>
<p>Possible Reason/Solutions<br />
===========================<br />
Some might have this problem with their fresh Magento Installation or a Custom Magento Store, some have this problem with their exsiting installtion that is running fine for a long time. Sometime, this error is not visible and it just affect and make some Magento feature not working, for example this error just can be seen with Web Developer by tracking Ajax request and response. So here are a few possible reason<br />
- Htaccess file which is located at Magento root folder. It will be this case if you meet Internal Server Error on every page. Try to remove it for testing purpose<br />
If your website was running file for a long time, then it must be a change at Server side, just submit a ticket to Hosting Company.</p>
<p>The reason might be default permission on some hosting. Some hosting doesn’t allow high permission on folder, some need to grant correct permission on running script. For most cases I meet, you need to set permission 755 for index.php at Magento root<br />
- Code Exception. Okay if you are not technical person, then there is no much thing you can do. Here are some ways you can try before need support from Magento Experts<br />
+ Download magento-check.php script in order to validate basic requirement of your hosting<br />
+ Run magento-clean tool to see if it solve your problem<br />
- Custom code/module conflict. OK, so if you have tried all way above and they don’t help. You may want to play around it. Here is my advise</p>
<p>Turn on Developer Mode</p>
<p>If you look in the Magento bootstrap file (index.php) you’ll see lines similar to the following</p>
<p>#Mage::setIsDeveloperMode(true);<br />
#ini_set(&#8216;display_errors&#8217;, 1);</p>
<p>Uncomment these. In a production system, you’d never want to have your errors display to the browser, but while developing having an errors and warnings thrown immediately in your face is invaluable.</p>
<p>This way, you will see the actually problem which lead to the Internal Error Server. In almost cases, the reason is that there is an exception throw after output is sent to browser.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/magento-issue-internal-server-error-500.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html&amp;title=Magento+Issue+-+Internal+Server+Error+500" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html&amp;title=Magento+Issue+-+Internal+Server+Error+500" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html&amp;title=Magento+Issue+-+Internal+Server+Error+500&amp;desc=Today%20we%20will%20find%20out%20a%20solution%20troubleshooting%20Internal%20Server%20Error%20with%20Magento%20Store%20in%20any%20case%20for%20any%20reason.%0D%0A%0D%0APossible%20Reason%2FSolutions%0D%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0D%0ASome%20might%20have%20this%20problem%20with%20their%20fresh%20Magento%20Installation%20or%20a%20Custom%20Magento%20Store%2C%20some%20have%20this%20problem%20with%20" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html&amp;bm_description=Magento+Issue+-+Internal+Server+Error+500&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html&amp;title=Magento+Issue+-+Internal+Server+Error+500" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html&amp;title=Magento+Issue+-+Internal+Server+Error+500" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html&amp;title=Magento+Issue+-+Internal+Server+Error+500" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/magento-issue-internal-server-error-500.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Magento+Issue+-+Internal+Server+Error+500+-+http://bit.ly/Ao9dnY&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/magento-issue-internal-server-error-500.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to move Magento from Local to Live Server</title>
		<link>http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html</link>
		<comments>http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html#comments</comments>
		<pubDate>Mon, 26 Sep 2011 16:29:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=330</guid>
		<description><![CDATA[This is the method I used to move my local copy of magento store from XAMPP on windows to a shared hosting account. Whilst developing my store, the size of the database became fairly big, around 70MB. Enough to start complicating the process. After numerious failed attempts, i finally got the right method. Hope this [...]]]></description>
			<content:encoded><![CDATA[<p>This is the method I used to move my local copy of magento store from XAMPP on windows to a shared hosting account. Whilst developing my store, the size of the database became fairly big, around 70MB. Enough to start complicating the process. After numerious failed attempts, i finally got the right method. Hope this helps you out, any feedback will be greatly appreciated.</p>
<p>Local Server Copy</p>
<p>1. Login into your Local copy of Magento and change configuration > web > unsecured link &#038; sercured link to {{base_url}}<br />
2. This prevents errors with the file paths when you move the server and will be changed back later on.<br />
3. Change the cache settings in the configuration to refresh and save.<br />
4. Open myPHPadmin http://localhost/phpmyadmin/ and select your magento database<br />
5. You are now going to export a copy of the database, also know as a dump. Use the following settings: Leave all the settings as they are but use the “save file as” and use compression none.</p>
<p>Live Server</p>
<p>1. In your control panel for you live server, set up a new mysql database with the same dbname, username, password<br />
2. Unzip the latest version of Magento Commerce onto our root web folder<br />
3. Install a fresh copy of magento using the same database settings<br />
4. After a sucessful install, FTP your media folder and any template files you changed onto the live server, making sure that the file permissions are correct (i.e 777).<br />
5. Delete the var/cache and car/session folder from Live Server<br />
6. Login to the control panelfor for you mysql database (phpmyadmin in my case) and delete all the tables in you new magento database but not the database itself!<br />
7. Import your old magento database using the Import Tab and following the steps.<br />
8. Log into the magneto manager, and now change the {{base_url}} settings to reflect you new domain i.e http://www.webdesignlab.co.uk/magento<br />
9. And finally give the cache settings a refresh.<br />
10. Once complete, check your url and you should see your old site on the new server without any errors. </p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html&amp;title=How+to+move+Magento+from+Local+to+Live+Server" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html&amp;title=How+to+move+Magento+from+Local+to+Live+Server" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html&amp;title=How+to+move+Magento+from+Local+to+Live+Server&amp;desc=This%20is%20the%20method%20I%20used%20to%20move%20my%20local%20copy%20of%20magento%20store%20from%20XAMPP%20on%20windows%20to%20a%20shared%20hosting%20account.%20Whilst%20developing%20my%20store%2C%20the%20size%20of%20the%20database%20became%20fairly%20big%2C%20around%2070MB.%20Enough%20to%20start%20complicating%20the%20process.%20After%20numerious%20failed%20attempts%2C%20i%20finally%20got%20the%20right%20" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html&amp;bm_description=How+to+move+Magento+from+Local+to+Live+Server&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html&amp;title=How+to+move+Magento+from+Local+to+Live+Server" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html&amp;title=How+to+move+Magento+from+Local+to+Live+Server" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html&amp;title=How+to+move+Magento+from+Local+to+Live+Server" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+to+move+Magento+from+Local+to+Live+Server+-+http://bit.ly/qsarkT&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/how-to-move-magento-from-local-to-live-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting UP a Local network DNS Server using bind9 for debian</title>
		<link>http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html</link>
		<comments>http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html#comments</comments>
		<pubDate>Mon, 13 Jun 2011 08:59:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=327</guid>
		<description><![CDATA[This is a step by step tutorial on how to install and configure DNS server for your LAN using bind9. The DNS server will provide caching and name resolution as well as reverse name resolution for your local network. In this tutorial, we will use the domain &#8220;debian.lan&#8221; and this will be the domain of [...]]]></description>
			<content:encoded><![CDATA[<p ljfbq="0" slrnp="0">This is a step by step tutorial on how to install and configure DNS server for your LAN using bind9. The DNS server will provide caching and name resolution as well as reverse name resolution for your local network. In this tutorial, we will use the domain &#8220;debian.lan&#8221; and this will be the domain of your local network. The domain &#8220;debian.lan is not accessible from the internet; its private ip address is &#8220;192.168.100.1&#8243;.</p>
<h2 ljfbq="0" slrnp="0">Installing bind9 and dns utilities</h2>
<p ljfbq="0" slrnp="4">I assume that you already have a working <a class="alinks-link" title="Debian" href="http://www.debian.org/" rel="external" ljfbq="0" slrnp="0" jquery1227530253515="31">Debian</a> or <a class="alinks-link" title="Ubuntu" href="http://www.cahilig.org/why-use-ubuntu-linux" rel="external" ljfbq="0" slrnp="0" jquery1227530253515="32">Ubuntu</a> installation. Lets install the bind9 package and dns utilities from Debian repository.</p>
<div class="codeblock" ljfbq="0" slrnp="0">apt-get install bind9 dnsutils</div>
<h2 ljfbq="0" slrnp="0">Configure your Linux system</h2>
<p ljfbq="0" slrnp="0">Add this information to your <em ljfbq="0" slrnp="0">/etc/hostname</em></p>
<div class="codeblock" ljfbq="0" slrnp="0">echo &#8220;main.debian.lan&#8221; &gt; /etc/hostname</div>
<p ljfbq="0" slrnp="0">Edit your <em ljfbq="0" slrnp="0">/etc/hosts</em></p>
<pre ljfbq="0" slrnp="0">127.0.0.1       localhost.localdomain   localhost
192.168.100.1   main.debian.lan main
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
</pre>
<p ljfbq="0" slrnp="0">Edit your <em ljfbq="0" slrnp="0">/etc/resolv.conf</em></p>
<div class="codeblock" ljfbq="0" slrnp="0">vi /etc/resolv.conf</div>
<p ljfbq="0" slrnp="0">and add this information.</p>
<pre ljfbq="0" slrnp="0">search debian.local
nameserver 192.168.100.1
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
</pre>
<p ljfbq="0" slrnp="0">This is where Linux looks to find out how it should perform DNS lookups.</p>
<h2 ljfbq="0" slrnp="0">Lets create a zone</h2>
<p ljfbq="0" slrnp="2">The zone files (or database files) are the heart of your BIND system. This is where all the information is stored on what hostname goes with what ip address.<br />
Before we create a zone file, lets edit first the local configuration file <em ljfbq="0" slrnp="0">/etc/bind/named.conf.local</em>.</p>
<div class="codeblock" ljfbq="0" slrnp="0">vi /etc/bind/named.conf.local</div>
<p ljfbq="0" slrnp="0">and the zone file data.</p>
<pre ljfbq="0" slrnp="0">//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "debian.lan" {
        type master;
        file "db.debian.lan";
};

zone "100.168.192.in-addr.arpa" {
        type master;
        file "db.192.168.100";
};
</pre>
<p ljfbq="0" slrnp="2">Lets start creating a zone file in <em ljfbq="0" slrnp="0">/var/cache/bind/</em> directory. Create a file called db.debian.lan</p>
<div class="codeblock" ljfbq="0" slrnp="0">vi /var/cache/bind/db.debian.lan</div>
<p ljfbq="0" slrnp="0">And add the following entry</p>
<pre ljfbq="0" slrnp="0">$TTL 604800
@ IN <a class="kLink" oncontextmenu="return false;" id="KonaLink0" onmouseover="adlinkMouseOver(event,this,0);" style="position: static; text-decoration: underline! important" onclick="adlinkMouseClick(event,this,0);" onmouseout="adlinkMouseOut(event,this,0);" href="http://www.cahilig.org/how-setup-a-lan-dns-server-using-bind9-under-debian-and-ubuntu-linux#" target="_new"><font style="font-weight: 400; font-size: 14px; color: #0000ff! important; font-family: Courier New,Courier,mono; position: static" color="#0000ff"><span class="kLink" style="font-weight: 400; font-size: 14px; color: #0000ff! important; font-family: Courier New,Courier,mono; position: relative">SOA</span></font></a> main.debian.lan. admin.debian.lan. (
                2008080101      ;serial
                04800           ;refresh
                86400           ;retry
                2419200         ;expire
                604800          ;negative cache TTL
                )
@       IN      NS      main.debian.lan.
@       IN      A       192.168.100.1
@       IN      MX      10      main.debian.lan.
main    IN      A       192.168.100.1
www     IN      CNAME   main
ubuntu  IN      A       192.168.100.2
</pre>
<p ljfbq="0" slrnp="0">Lets create the reverse DNS zone file called <em ljfbq="0" slrnp="0">db.192.168.100</em></p>
<div class="codeblock" ljfbq="0" slrnp="0">vi /var/cache/bind/db.192.168.100</div>
<p ljfbq="0" slrnp="0">and the the following entry.</p>
<pre ljfbq="0" slrnp="0">$TTL 604800
@ IN SOA main.debian.lan. admin.debian.lan. (
                2008080101      ;serial
                604800          ;refresh
                86400           ;retry
                2419200         ;expire
                604800          ;negative cache TTL
                )
@       IN      NS      main.debian.lan.
@       IN      A       192.168.100.1
1       IN      PTR     main.debian.lan.
2       IN      PTR     ubuntu.debian.lan.
</pre>
<p ljfbq="0" slrnp="0">The zone files are created, you can check your zone file configurations using these utilities:</p>
<div class="codeblock" ljfbq="0" slrnp="0">named-checkzone convergence.lan /etc/bind/zones/db.convergence.lan</div>
<p ljfbq="0" slrnp="0">Lets edit the file <em ljfbq="0" slrnp="0">/etc/bind/named.conf.options</em></p>
<div class="codeblock" ljfbq="0" slrnp="0">vi /etc/bind/named.conf.options</div>
<pre ljfbq="0" slrnp="0">forwarders {
                202.78.97.41;
                202.78.97.3;
        };
</pre>
<p ljfbq="0" slrnp="2">Uncomment the line <em ljfbq="0" slrnp="0">forwarders</em> and add your ISP&#8217;s DNS server.</p>
<div class="codeblock" ljfbq="0" slrnp="0">dig debian.lan</div>
<p ljfbq="0" slrnp="0">Lets restart our DNS server, and test using the tool <em ljfbq="0" slrnp="0">dig</em>.</p>
<div class="codeblock" ljfbq="0" slrnp="2">/etc/init.d/bind9 restart<br />
dig debian.lan</div>
<p ljfbq="0" slrnp="0">You should see the following message</p>
<pre ljfbq="0" slrnp="0">; &lt;&lt;&gt;&gt; DiG 9.3.4 &lt;&lt;&gt;&gt; debian.lan
;; global options:  printcmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 54950
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;debian.lan.                    IN      A

;; ANSWER SECTION:
debian.lan.             64800   IN      A       192.168.100.1

;; AUTHORITY SECTION:
debian.lan.             64800   IN      NS      main.debian.lan.

;; ADDITIONAL SECTION:
main.debian.lan.        64800   IN      A       192.168.100.1

;; Query time: 1 msec
;; SERVER: 192.168.100.1#53(192.168.100.1)
;; WHEN: Tue Aug  5 09:33:40 2008
;; MSG SIZE  rcvd: 79
</pre>
<p ljfbq="0" slrnp="0">Test your reverse DNS</p>
<div class="codeblock" ljfbq="0" slrnp="0">dig -x debian.lan</div>
<p ljfbq="0" slrnp="0">If you see this message, you have successfully installed the DNS server.</p>
<pre ljfbq="0" slrnp="0">; &lt;&lt;&gt;&gt; DiG 9.3.4 &lt;&lt;&gt;&gt; -x debian.lan
;; global options:  printcmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NXDOMAIN, id: 42510
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;lan.debian.in-addr.arpa.       IN      PTR

;; AUTHORITY SECTION:
in-addr.arpa.		10800	IN	SOA	A.ROOT-SERVERS.NET. dns-ops.ARIN.NET. 2008080416 1800 900 691200 10800

;; Query time: 952 msec
;; SERVER: 192.168.100.1#53(192.168.100.1)
;; WHEN: Tue Aug  5 09:34:25 2008
;; MSG SIZE  rcvd: 108
</pre>
<p ljfbq="0" slrnp="4">You can also check your DNS configuration using <em ljfbq="0" slrnp="0">nslookup</em> and <em ljfbq="0" slrnp="0">host</em> command.</p>
<div class="codeblock" ljfbq="0" slrnp="6">nslookup debian.lan<br />
nslookup 192.168.100.1<br />
host debian.lan<br />
host 192.168.0.1</div>
<p ljfbq="0" slrnp="0">All computers in the LAN are going to use 192.168.100.1 as a nameserver, this can be set manually by setting statically:</p>
<div class="codeblock" ljfbq="0" slrnp="0">vi /etc/resolv.conf</div>
<p ljfbq="0" slrnp="0">then put this information.</p>
<pre ljfbq="0" slrnp="0">nameserver 192.168.100.1
</pre>
<p ljfbq="0" slrnp="2">Have fun!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html&amp;title=Setting+UP+a+Local+network+DNS+Server+using+bind9+for+debian" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html&amp;title=Setting+UP+a+Local+network+DNS+Server+using+bind9+for+debian" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html&amp;title=Setting+UP+a+Local+network+DNS+Server+using+bind9+for+debian&amp;desc=This%20is%20a%20step%20by%20step%20tutorial%20on%20how%20to%20install%20and%20configure%20DNS%20server%20for%20your%20LAN%20using%20bind9.%20The%20DNS%20server%20will%20provide%20caching%20and%20name%20resolution%20as%20well%20as%20reverse%20name%20resolution%20for%20your%20local%20network.%20In%20this%20tutorial%2C%20we%20will%20use%20the%20domain%20%22debian.lan%22%20and%20this%20will%20be%20the%20domain%20of" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html&amp;bm_description=Setting+UP+a+Local+network+DNS+Server+using+bind9+for+debian&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html&amp;title=Setting+UP+a+Local+network+DNS+Server+using+bind9+for+debian" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html&amp;title=Setting+UP+a+Local+network+DNS+Server+using+bind9+for+debian" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html&amp;title=Setting+UP+a+Local+network+DNS+Server+using+bind9+for+debian" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Setting+UP+a+Local+network+DNS+Server+using+bind9+for+debian+-+http://bit.ly/iB1xSF&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/setting-up-a-local-network-dns-server-using-bind9-for-debian.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create SEF URL&#8217;s in WordPress</title>
		<link>http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html</link>
		<comments>http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html#comments</comments>
		<pubDate>Wed, 06 Apr 2011 14:28:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[SEF URL]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Wordpress SEO]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=324</guid>
		<description><![CDATA[While working on one of my client’s plugin&#160;I needed to provide search engine friendly url’s for some custom functionality that was needed and existing plugin was not supporting such urls www.example.com/?param1=var1&#38;param2=var2&#38;param3=var3 but for search engine freindly url’s I want it to be like www.example.com/var1/var2/var3 So here I am sharing small code&#160;snippet&#160;which works perfectly for my [...]]]></description>
			<content:encoded><![CDATA[<p>While working on one of my client’s plugin&nbsp;I needed to provide search engine friendly url’s for some custom functionality that was needed and existing plugin was not supporting such urls</p>
<pre>       www.example.com/?param1=var1&amp;param2=var2&amp;param3=var3</pre>
<p>but for search engine freindly url’s I want it to be like</p>
<pre>      www.example.com/var1/var2/var3</pre>
<p>So here I am sharing small code&nbsp;snippet&nbsp;which works perfectly for my plguin and showing nice url’s.</p>
<p>We need to update the theme function.php file, just add the below code in function.php file and modify variables according to your need.</p>
<pre>&lt;?php</pre>
<pre>add_filter('rewrite_rules_array','wp_insertRewriteRules');
add_filter('query_vars','wp_insertQueryVars');
add_filter('init','flushRules');

// Remember to flush_rules() when adding rules
function flushRules()
{
  global $wp_rewrite;
  $wp_rewrite-&gt;flush_rules();
}

// Adding a new rule
function wp_insertRewriteRules($rules)
{
  $newrules = array();
  $newrules['(mytestpage)/([a-zA-Z0-9_\-]*)/([a-zA-Z0-9_\-]*)$'] =
'index.php?pagename=$matches[1]&amp;var1=$matches[2]&amp;var2=$matches[3]';
  $allrules = $newrules + $rules;
  return $allrules;
}

// Adding the variables&nbsp; so that WP recognizes it
function wp_insertQueryVars($vars)
{
 array_push($vars, 'id');
 array_push($vars, 'var1');
 array_push($vars, 'var2');
 return $vars;
}
?&gt;</pre>
<p>To access these variables from plugin file use following code:</p>
<pre> $var1 = $wp_query-&gt;query_vars['var1'];
 $var2 = $wp_query-&gt;query_vars['var2'];</pre>
<p>Now this will solve your plugins search engine friendly&nbsp;issues.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html&amp;title=How+to+create+SEF+URL%27s+in+Wordpress+" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html&amp;title=How+to+create+SEF+URL%27s+in+Wordpress+" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html&amp;title=How+to+create+SEF+URL%27s+in+Wordpress+&amp;desc=While%20working%20on%20one%20of%20my%20client%E2%80%99s%20plugin%26nbsp%3BI%20needed%20to%20provide%20search%20engine%20friendly%20url%E2%80%99s%20for%20some%20custom%20functionality%20that%20was%20needed%20and%20existing%20plugin%20was%20not%20supporting%20such%20urls%0D%0A%20%20%20%20%20%20%20www.example.com%2F%3Fparam1%3Dvar1%26amp%3Bparam2%3Dvar2%26amp%3Bparam3%3Dvar3%0D%0Abut%20for%20search%20engine%20freindly%20url" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html&amp;bm_description=How+to+create+SEF+URL%27s+in+Wordpress+&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html&amp;title=How+to+create+SEF+URL%27s+in+Wordpress+" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html&amp;title=How+to+create+SEF+URL%27s+in+Wordpress+" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html&amp;title=How+to+create+SEF+URL%27s+in+Wordpress+" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+to+create+SEF+URL%27s+in+Wordpress++-+http://bit.ly/hZo4sY&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/how-to-create-sef-urls-in-wordpress.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Lightbox with jQuery</title>
		<link>http://www.dmarkweb.com/jquery-lightbox-with-jquery.html</link>
		<comments>http://www.dmarkweb.com/jquery-lightbox-with-jquery.html#comments</comments>
		<pubDate>Fri, 30 Apr 2010 20:29:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cakePHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[cakePHP Development]]></category>
		<category><![CDATA[Custom PHP Development]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=305</guid>
		<description><![CDATA[It&#8217;s quite difficult to copy-paste JavaScript for same thing again and again. That&#8217;s why I&#8217;ve come up with Thickbox helper for CakePHP – as a result of a project which involved lot of thickboxes implementations. For those who don&#8217;t know what it is be sure to check Thickbox jQuery Plugin. To use it, just include [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite difficult to copy-paste JavaScript for same thing again and again. That&#8217;s why I&#8217;ve come up with Thickbox helper for CakePHP – as a result of a project which involved lot of thickboxes implementations. For those who don&#8217;t know what it is be sure to check <a href="http://jquery.com/demo/thickbox/">Thickbox jQuery Plugin</a>.
</p>
<p>To use it, just include this helper in your controller and Its implementation is very simple:
</p>
<p>1. For inline content:
</p>
<div class="igBar"><span id="lphp-1"><a href="#" onclick="javascript:showPlainTxt('php-1'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-1">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$thickbox</span>-&gt;<span style="color: rgb(0, 102, 0);">setProperties</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><a href="http://www.php.net/array"><span style="color: rgb(0, 0, 102);">array</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;id&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8216;domId&#8217;</span>, <span style="color: rgb(255, 0, 0);">&#8216;height&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8217;300&#8242;</span>, <span style="color: rgb(255, 0, 0);">&#8216;width&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8217;334&#8242;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>; <span style="color: rgb(255, 153, 51); font-style: italic;">// set height, width and DOM ID</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$thickbox</span>-&gt;<span style="color: rgb(0, 102, 0);">setPreviewContent</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;click me&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>; <span style="color: rgb(255, 153, 51); font-style: italic;">// the link which will trigger thickbox on click</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$thickbox</span>-&gt;<span style="color: rgb(0, 102, 0);">setMainContent</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;&lt;div&gt;see it??&lt;/div&gt;&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>; <span style="color: rgb(255, 153, 51); font-style: italic;">// the content which will be shown in thickbox</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$thickbox</span>-&gt;<span style="color: rgb(0, 102, 0);">output</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
&nbsp;</p>
<p>2. For AJAX:
</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$thickbox</span>-&gt;<span style="color: rgb(0, 102, 0);">setProperties</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><a href="http://www.php.net/array"><span style="color: rgb(0, 0, 102);">array</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;id&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8216;domId&#8217;</span>,<span style="color: rgb(255, 0, 0);">&#8216;type&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8216;ajax&#8217;</span>,<span style="color: rgb(255, 0, 0);">&#8216;ajaxUrl&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8216;/controller/action&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$thickbox</span>-&gt;<span style="color: rgb(0, 102, 0);">setPreviewContent</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8220;Click me to see thickbox&#8221;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$thickbox</span>-&gt;<span style="color: rgb(0, 102, 0);">output</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>Here&#8217;s the helper:
</p>
<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showPlainTxt('php-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-3">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">class</span> ThickboxHelper extends AppHelper <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">var</span> <span style="color: rgb(0, 0, 255);">$helpers</span> = <a href="http://www.php.net/array"><span style="color: rgb(0, 0, 102);">array</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Javascript&#8217;</span>, <span style="color: rgb(255, 0, 0);">&#8216;Html&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 128, 0);">/**</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 128, 0);">&nbsp; &nbsp;&nbsp; * Set properties &#8211; DOM ID, Height and Width, Type of thickbox window &#8211; inline or ajax</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 128, 0);">&nbsp; &nbsp;&nbsp; *</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 128, 0);">&nbsp; &nbsp;&nbsp; * @param array $options</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 128, 0);">&nbsp; &nbsp;&nbsp; */</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> setProperties<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$options</span> = <a href="http://www.php.net/array"><span style="color: rgb(0, 0, 102);">array</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span>!<a href="http://www.php.net/isset"><span style="color: rgb(0, 0, 102);">isset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'type'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'type'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span> = <span style="color: rgb(255, 0, 0);">&#8216;inline&#8217;</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">options</span> = <span style="color: rgb(0, 0, 255);">$options</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> setPreviewContent<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$content</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'previewContent'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span> = <span style="color: rgb(0, 0, 255);">$content</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> setMainContent<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$content</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'mainContent'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span> = <span style="color: rgb(0, 0, 255);">$content</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> <a href="http://www.php.net/reset"><span style="color: rgb(0, 0, 102);">reset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">options</span> = <a href="http://www.php.net/array"><span style="color: rgb(0, 0, 102);">array</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> output<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/extract"><span style="color: rgb(0, 0, 102);">extract</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$type</span>==<span style="color: rgb(255, 0, 0);">&#8216;inline&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$href</span> = <span style="color: rgb(255, 0, 0);">&#8216;#TB_inline?&#8217;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$href</span> .= <span style="color: rgb(255, 0, 0);">&#8216;&amp;inlineId=&#8217;</span>.<span style="color: rgb(0, 0, 255);">$id</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">elseif</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$type</span>==<span style="color: rgb(255, 0, 0);">&#8216;ajax&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$ajaxUrl</span> = <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">Html</span>-&gt;<span style="color: rgb(0, 102, 0);">url</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$ajaxUrl</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$href</span> = <span style="color: rgb(0, 0, 255);">$ajaxUrl</span>.<span style="color: rgb(255, 0, 0);">&#8216;?&#8217;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><a href="http://www.php.net/isset"><span style="color: rgb(0, 0, 102);">isset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$height</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$href</span> .= <span style="color: rgb(255, 0, 0);">&#8216;&amp;height=&#8217;</span>.<span style="color: rgb(0, 0, 255);">$height</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><a href="http://www.php.net/isset"><span style="color: rgb(0, 0, 102);">isset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$width</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$href</span> .= <span style="color: rgb(255, 0, 0);">&#8216;&amp;width=&#8217;</span>.<span style="color: rgb(0, 0, 255);">$width</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$output</span> = <span style="color: rgb(255, 0, 0);">&#8216;&lt;a class=&#8221;thickbox&#8221; href=&#8221;&#8216;</span>.<span style="color: rgb(0, 0, 255);">$href</span>.<span style="color: rgb(255, 0, 0);">&#8216;&#8221;&gt;&#8217;</span>.<span style="color: rgb(0, 0, 255);">$previewContent</span>.<span style="color: rgb(255, 0, 0);">&#8216;&lt;/a&gt;&#8217;</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$type</span>==<span style="color: rgb(255, 0, 0);">&#8216;inline&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$output</span> .= <span style="color: rgb(255, 0, 0);">&#8216;&lt;div id=&#8221;&#8216;</span>.<span style="color: rgb(0, 0, 255);">$id</span>.<span style="color: rgb(255, 0, 0);">&#8216;&#8221; style=&#8221;display:none;&#8221;&gt;&#8217;</span>.<span style="color: rgb(0, 0, 255);">$mainContent</span>.<span style="color: rgb(255, 0, 0);">&#8216;&lt;/div&gt;&#8217;</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/unset"><span style="color: rgb(0, 0, 102);">unset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">return</span> <span style="color: rgb(0, 0, 255);">$output</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> beforeRender<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$out</span> = <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">Html</span>-&gt;<span style="color: rgb(0, 102, 0);">css</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;/effects/css/thickbox.css&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>.<span style="color: rgb(255, 0, 0);">&#8216;&lt;script src=&#8221;&#8216;</span>.<span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">Html</span>-&gt;<span style="color: rgb(0, 102, 0);">url</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;/effects/js/thickbox-compressed.js&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>.<span style="color: rgb(255, 0, 0);">&#8216;&#8221;&gt;&lt;/script&gt;&#8217;</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$view</span> =&amp; ClassRegistry::<span style="color: rgb(0, 102, 0);">getObject</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;view&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$view</span>-&gt;<span style="color: rgb(0, 102, 0);">addScript</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$out</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
&nbsp;</p>
<p>You&#8217;ll need to copy the thickbox files to /app/webroot/effects. You can keep it in any folder for that matter, but as our team is following plugins – it&#8217;s made that way.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/jquery-lightbox-with-jquery.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html&amp;title=jQuery+Lightbox+with+jQuery" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html&amp;title=jQuery+Lightbox+with+jQuery" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html&amp;title=jQuery+Lightbox+with+jQuery&amp;desc=%0D%0A%09%09%09%09It%27s%20quite%20difficult%20to%20copy-paste%20JavaScript%20for%20same%20thing%20again%20and%20again.%20That%27s%20why%20I%27ve%20come%20up%20with%20Thickbox%20helper%20for%20CakePHP%20%E2%80%93%20as%20a%20result%20of%20a%20project%20which%20involved%20lot%20of%20thickboxes%20implementations.%20For%20those%20who%20don%27t%20know%20what%20it%20is%20be%20sure%20to%20check%20Thickbox%20jQuery%20Plugin.%0D%0A%0D%0A" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html&amp;bm_description=jQuery+Lightbox+with+jQuery&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html&amp;title=jQuery+Lightbox+with+jQuery" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html&amp;title=jQuery+Lightbox+with+jQuery" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html&amp;title=jQuery+Lightbox+with+jQuery" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/jquery-lightbox-with-jquery.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=jQuery+Lightbox+with+jQuery+-+http://b2l.me/r6eys&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/jquery-lightbox-with-jquery.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using AJAX with CakePHP Forms</title>
		<link>http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html</link>
		<comments>http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html#comments</comments>
		<pubDate>Fri, 30 Apr 2010 20:24:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cakePHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[cakePHP AJAX]]></category>
		<category><![CDATA[Custom PHP Development]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=303</guid>
		<description><![CDATA[CakePHP helpers are so powerful that when you begin to hack helpers here and there you discover a lot of possibilities which can save you a lot of time. Same thing happened when I had an idea to AJAX&#8217;ify the forms using some shortcut. Let&#8217;s try hacking the FormHelper and enable AJAX. We&#8217;ll use jQuery [...]]]></description>
			<content:encoded><![CDATA[<p>CakePHP helpers are so powerful that when you begin to hack helpers here and there you discover a lot of possibilities which can save you a lot of time. Same thing happened when I had an idea to AJAX&#8217;ify the forms using some shortcut.
</p>
<p>Let&#8217;s try hacking the FormHelper and enable AJAX. We&#8217;ll use <a href="http://malsup.com/jquery/form/">jQuery Form plugin</a> to submit forms via AJAX request (I don&#8217;t know any other good plugins for forms).
</p>
<p>What we&#8217;ll be doing:
</p>
<p>Converting a normal form like below one, to make it call AJAX(using jQuery lib) and alert us when form posted:
</p>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-1">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&lt;div <span style="color: rgb(0, 0, 0); font-weight: bold;">class</span>=<span style="color: rgb(255, 0, 0);">&#8220;jerks form&#8221;</span>&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$form</span>-&gt;<span style="color: rgb(0, 102, 0);">create</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Jerk&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &lt;fieldset&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;legend&gt;&lt;?php __<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Add Jerk&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;&lt;/legend&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$form</span>-&gt;<span style="color: rgb(0, 102, 0);">input</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;name&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/fieldset&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$form</span>-&gt;<span style="color: rgb(0, 102, 0);">end</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Submit&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&lt;/div&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
&nbsp;</p>
<p>1. Extend your FormHelper to something like AjaxFormHelper (Now normally I don&#8217;t extend core helpers like this, but use a similar method similar to this (comment by grigri): <a href="http://cakebaker.42dh.com/2008/10/18/dont-abuse-the-apphelper-to-extend-the-core-helpers/#comment-110708">http://cakebaker.42dh.com/2008/10/18/dont-abuse-the-apphelper-to-extend-the-core-helpers/#comment-110708</a> ) and overwrite create() method like this:
</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> create<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$model</span> = <span style="color: rgb(0, 0, 0); font-weight: bold;">null</span>, <span style="color: rgb(0, 0, 255);">$options</span> = <a href="http://www.php.net/array"><span style="color: rgb(0, 0, 102);">array</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$output</span> = <span style="color: rgb(255, 0, 0);">&#8220;&#8221;</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><a href="http://www.php.net/isset"><span style="color: rgb(0, 0, 102);">isset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'ajax'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span> &amp;&amp; <span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'ajax'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>==<span style="color: rgb(255, 0, 0);">&#8216;true&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span>!<a href="http://www.php.net/isset"><span style="color: rgb(0, 0, 102);">isset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span> = <span style="color: rgb(255, 0, 0);">&#8216;form&#8217;</span> . <a href="http://www.php.net/intval"><span style="color: rgb(0, 0, 102);">intval</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><a href="http://www.php.net/mt_rand"><span style="color: rgb(0, 0, 102);">mt_rand</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">ajaxForm</span> = <span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$url</span> = <span style="color: rgb(255, 0, 0);">&#8220;$(&#8216;#&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8220;&#8216;).attr(&#8216;action&#8217;)+&#8217;?ajax=1&amp;flash_only=1&#8243;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span>@<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'response'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>==<span style="color: rgb(255, 0, 0);">&#8216;inline&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$datatype</span> = <span style="color: rgb(255, 0, 0);">&#8216;text&#8217;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$success</span> = <span style="color: rgb(255, 0, 0);">&#8220;$(&#8216;#&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8220;_status&#8217;).hide().html(responseText).fadeIn();</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setTimeout(function(){</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8220;_status&#8217;).fadeOut();</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, 5000);&#8221;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$url</span> .= <span style="color: rgb(255, 0, 0);">&#8220;&amp;js=false&#8217;&#8221;</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">else</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$datatype</span> = <span style="color: rgb(255, 0, 0);">&#8216;script&#8217;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$success</span> = <span style="color: rgb(255, 0, 0);">&#8221;</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$url</span> .= <span style="color: rgb(255, 0, 0);">&#8220;&#8216;&#8221;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(255, 153, 51); font-style: italic;">// to-do: avoid multiple inclusion of this script</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$output</span> .= <span style="color: rgb(255, 0, 0);">&#8220;&lt;div id=&#8217;&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8220;_status&#8217; style=&#8217;display:none;&#8217;&gt;&lt;/div&gt;&#8221;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$output</span> .= <span style="color: rgb(255, 0, 0);">&#8220;&lt;script src=&#8217;&#8221;</span>.<span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">Html</span>-&gt;<span style="color: rgb(0, 102, 0);">url</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;/effects/js/jquery.form.js&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>.<span style="color: rgb(255, 0, 0);">&#8220;&#8216;&gt;&lt;/script&gt;&#8221;</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$output</span> .= <span style="color: rgb(255, 0, 0);">&#8220;&lt;script&gt;</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; $(document).ready(function() { </span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$(&#8216;#&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8220;&#8216;).ajaxForm({dataType: &#8216;&#8221;</span>.<span style="color: rgb(0, 0, 255);">$datatype</span>.<span style="color: rgb(255, 0, 0);">&#8220;&#8216;, url:&nbsp; &#8220;</span>.<span style="color: rgb(0, 0, 255);">$url</span>.<span style="color: rgb(255, 0, 0);">&#8220;, </span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;beforeSubmit: function(){</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8221; .submit input&#8217;).attr(&#8216;disabled&#8217;, true);</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#progressIndicator&#8217;).show();</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8221; .form_progress&#8217;).show();</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;},</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;success: function(responseText, statusText){</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8221; .submit input&#8217;).attr(&#8216;disabled&#8217;, false);</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#progressIndicator&#8217;).hide();</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#8216;#&#8221;</span>.<span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'id'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>.<span style="color: rgb(255, 0, 0);">&#8221; .form_progress&#8217;).hide();</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;</span>.<span style="color: rgb(0, 0, 255);">$success</span>.<span style="color: rgb(255, 0, 0);">&#8220;</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;},</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;}); </span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; }); </span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(255, 0, 0);">&nbsp; &nbsp; &lt;/script&gt;&#8221;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(255, 153, 51); font-style: italic;">// unset js options</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$output</span> .= parent::<span style="color: rgb(0, 102, 0);">create</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$model</span>, <span style="color: rgb(0, 0, 255);">$options</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">return</span> <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">output</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$output</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">}</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>I&#8217;m not that good in explaining code flow, but you might have noted 3 get variables appended to our form action URL above. These variables are: &#8216;ajax&#8217;,'flash_only&#8217; ,&#8217;js&#8217; and serves their own purpose that  I&#8217;ll tell in next steps.
</p>
<p>
&nbsp;</p>
<p>2. Now we enable the AJAX in our form (CakePHP&#8217;s $options array is so good that you can overwrite and modify almost many methods easily):
</p>
<p>This will show a JS alert after form has been submitted successfully.
</p>
<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showPlainTxt('php-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-3">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&lt;div <span style="color: rgb(0, 0, 0); font-weight: bold;">class</span>=<span style="color: rgb(255, 0, 0);">&#8220;jerks form&#8221;</span>&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$ajaxForm</span>-&gt;<span style="color: rgb(0, 102, 0);">create</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Jerk&#8217;</span>, <a href="http://www.php.net/array"><span style="color: rgb(0, 0, 102);">array</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;ajax&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8216;true&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &lt;fieldset&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;legend&gt;&lt;?php __<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Add Jerk&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;&lt;/legend&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$ajaxForm</span> -&gt;<span style="color: rgb(0, 102, 0);">input</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;name&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/fieldset&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$ajaxForm</span> -&gt;<span style="color: rgb(0, 102, 0);">end</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Submit&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&lt;/div&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>This will show an inline message after form has been submitted successfully.
</p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&lt;div <span style="color: rgb(0, 0, 0); font-weight: bold;">class</span>=<span style="color: rgb(255, 0, 0);">&#8220;jerks form&#8221;</span>&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$ajaxForm</span>-&gt;<span style="color: rgb(0, 102, 0);">create</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Jerk&#8217;</span>, <a href="http://www.php.net/array"><span style="color: rgb(0, 0, 102);">array</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;ajax&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8216;true&#8217;</span> , <span style="color: rgb(255, 0, 0);">&#8216;response&#8217;</span>=&gt;<span style="color: rgb(255, 0, 0);">&#8216;inline&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &lt;fieldset&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;legend&gt;&lt;?php __<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Add Jerk&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;&lt;/legend&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$ajaxForm</span> -&gt;<span style="color: rgb(0, 102, 0);">input</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;name&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/fieldset&gt;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$ajaxForm</span> -&gt;<span style="color: rgb(0, 102, 0);">end</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Submit&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;?&gt;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&lt;/div&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>Note that ajax=true parameter we sent in create() method. This will tell helper to load this form via AJAX.
</p>
<p>
&nbsp;</p>
<p>3. Now your form will be AJAX ready (if you&#8217;ve included this AjaxFormHelper properly). But because our controller function was made to process normal POST function, and flash message on success – we&#8217;ll have to change that behavior. This is what a normal JerksController::add() method should look like:
</p>
<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showPlainTxt('php-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-5">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> add<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">(</span>!<a href="http://www.php.net/empty"><span style="color: rgb(0, 0, 102);">empty</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">data</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">Jerk</span>-&gt;<span style="color: rgb(0, 102, 0);">create</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">Jerk</span>-&gt;<span style="color: rgb(0, 102, 0);">save</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">data</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">Session</span>-&gt;<span style="color: rgb(0, 102, 0);">setFlash</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Jerk saved.&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span> <span style="color: rgb(97, 97, 0);">else</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>We don&#8217;t need full action content from views/jerks/add.ctp to appear in response when AJAX is called. We can make this work traditional way by checking if it&#8217;s an AJAX request in controller method itself and do needful, but I wouldn&#8217;t want to modify all my controller functions to enable AJAX, so here&#8217;s what I&#8217;ve come up with.
</p>
<p>Remember the 3 GET variables above?
</p>
<p>&#8216;ajax&#8217; =&gt; This one will determine if a given HTTP request is an AJAX request.
</p>
<p>&#8216;flash_only&#8217;  =&gt; This will tell if rendering should happen or not. Flash only means, after controller function is executed, do not render, just show flash message.
</p>
<p>&#8216;js&#8217; =&gt; This is used for alert type, if this is not set, show inline alert. If set true, helper must show JS alert() on form success.
</p>
<p>Inside your AppController::beforeFilter(), add this code:
</p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><a href="http://www.php.net/isset"><span style="color: rgb(0, 0, 102);">isset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$_GET</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'ajax'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; Configure::<span style="color: rgb(0, 102, 0);">write</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;debug&#8217;</span>,<span style="color: rgb(128, 0, 0);">0</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">layout</span> = <span style="color: rgb(255, 0, 0);">&#8216;ajax&#8217;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; $ this -&gt;<span style="color: rgb(0, 102, 0);">set</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;ajax&#8217;</span>, <span style="color: rgb(0, 0, 0); font-weight: bold;">true</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$_GET</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'flash_only'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $ this -&gt;<span style="color: rgb(0, 102, 0);">set</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;flash_only&#8217;</span>, <span style="color: rgb(0, 0, 0); font-weight: bold;">true</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(255, 153, 51); font-style: italic;">//$ this -&gt;autoRender = false;</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$_GET</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'js'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>==<span style="color: rgb(255, 0, 0);">&#8216;false&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $ this -&gt;<span style="color: rgb(0, 102, 0);">set</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;js&#8217;</span>, <span style="color: rgb(128, 0, 0);">0</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">else</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $ this -&gt;<span style="color: rgb(0, 102, 0);">set</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;js&#8217;</span>, <span style="color: rgb(128, 0, 0);">1</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">}</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>Do not blame me for using GET variables, I found many issues with &#8216;named&#8217; so I&#8217;m relying on normal GET variables.
</p>
<p>Now you&#8217;ll need to edit ajax.ctp layout file.
</p>
<div class="igBar"><span id="lphp-7"><a href="#" onclick="javascript:showPlainTxt('php-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span></p>
<div id="php-7">
<div class="php">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(97, 97, 0);">if</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$session</span>-&gt;<span style="color: rgb(0, 102, 0);">check</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Message.flash&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$strMessage</span> = <span style="color: rgb(255, 0, 0);">&#8221;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$message</span> = <span style="color: rgb(0, 0, 255);">$session</span>-&gt;<span style="color: rgb(0, 102, 0);">read</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Message.flash&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><a href="http://www.php.net/isset"><span style="color: rgb(0, 0, 102);">isset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$message</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'params'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'type'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$type</span> = <span style="color: rgb(0, 0, 255);">$message</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'params'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'type'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$strMessage</span> = <a href="http://www.php.net/ucfirst"><span style="color: rgb(0, 0, 102);">ucfirst</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$type</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>.<span style="color: rgb(255, 0, 0);">&#8220;: &#8220;</span>.<span style="color: rgb(0, 0, 255);">$message</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'message'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">else</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$strMessage</span> = <span style="color: rgb(0, 0, 255);">$message</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(255, 0, 0);">'message'</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span>;&nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$session</span>-&gt;<span style="color: rgb(0, 102, 0);">del</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;Message.flash&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span>!<a href="http://www.php.net/empty"><span style="color: rgb(0, 0, 102);">empty</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">validationErrors</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$strMessage</span> = <span style="color: rgb(255, 0, 0);">&#8221;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">foreach</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">validationErrors</span> <span style="color: rgb(97, 97, 0);">as</span> <span style="color: rgb(0, 0, 255);">$model</span>=&gt;<span style="color: rgb(0, 0, 255);">$errors</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">foreach</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$this</span>-&gt;<span style="color: rgb(0, 102, 0);">validationErrors</span><span style="color: rgb(0, 102, 0); font-weight: bold;">[</span><span style="color: rgb(0, 0, 255);">$model</span><span style="color: rgb(0, 102, 0); font-weight: bold;">]</span> <span style="color: rgb(97, 97, 0);">as</span> <span style="color: rgb(0, 0, 255);">$field</span>=&gt;<span style="color: rgb(0, 0, 255);">$error</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 0, 255);">$strMessage</span> .= <span style="color: rgb(0, 0, 255);">$error</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?</span> </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$strMessage</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span> </div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$js</span>==<span style="color: rgb(128, 0, 0);">1</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span> </div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; alert<span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&#8216;&lt;?=$strMessage;?&gt;&#8217;</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span> <span style="color: rgb(97, 97, 0);">elseif</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$js</span>==<span style="color: rgb(128, 0, 0);">0</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$strMessage</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">}</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">}</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">&lt;?</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(97, 97, 0);">if</span><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span>!<a href="http://www.php.net/isset"><span style="color: rgb(0, 0, 102);">isset</span></a><span style="color: rgb(0, 102, 0); font-weight: bold;">(</span><span style="color: rgb(0, 0, 255);">$flash_only</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span><span style="color: rgb(0, 102, 0); font-weight: bold;">)</span></div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(0, 0, 255);">$content_for_layout</span>;</div>
</li>
<li style="font-weight: bold; color: rgb(38, 83, 106);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 102, 0); font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: rgb(58, 106, 139);">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>This should be self explanatory, even though this code definitely needs some refactoring.  We&#8217;re basically manipulating those 3 GET variables according to our need. In process, we&#8217;re also checking validation errors occurred in form.
</p>
<p>I have not used it under the production environment yet, so I&#8217;d really like to hear any pitfalls (if any) using this approach. Thanks for reading.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html&amp;title=Using+AJAX+with+CakePHP+Forms" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html&amp;title=Using+AJAX+with+CakePHP+Forms" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html&amp;title=Using+AJAX+with+CakePHP+Forms&amp;desc=CakePHP%20helpers%20are%20so%20powerful%20that%20when%20you%20begin%20to%20hack%20helpers%20here%20and%20there%20you%20discover%20a%20lot%20of%20possibilities%20which%20can%20save%20you%20a%20lot%20of%20time.%20Same%20thing%20happened%20when%20I%20had%20an%20idea%20to%20AJAX%27ify%20the%20forms%20using%20some%20shortcut.%0D%0A%0D%0ALet%27s%20try%20hacking%20the%20FormHelper%20and%20enable%20AJAX.%20We%27ll%20use%20jQ" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html&amp;bm_description=Using+AJAX+with+CakePHP+Forms&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html&amp;title=Using+AJAX+with+CakePHP+Forms" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html&amp;title=Using+AJAX+with+CakePHP+Forms" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html&amp;title=Using+AJAX+with+CakePHP+Forms" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Using+AJAX+with+CakePHP+Forms+-+http://b2l.me/r6d4c&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/using-ajax-with-cakephp-forms.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using CakePHP Framework for Web Development</title>
		<link>http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html</link>
		<comments>http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html#comments</comments>
		<pubDate>Fri, 30 Apr 2010 19:25:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cakePHP]]></category>
		<category><![CDATA[Custom PHP Development]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=300</guid>
		<description><![CDATA[dMarkWeb has been in business for a while.  Building and designing web applications using PHP.  We initially started building site management systems using our own developed file structure.  No templates, no smarty, just straight mixed up, stirred, PHP and html.  That is exactly what it was.  PHP with a bunch of echos everywhere to display [...]]]></description>
			<content:encoded><![CDATA[<p>dMarkWeb has been in business for a while.  Building and designing web applications using PHP.  We initially started building site management systems using our own developed file structure.  No templates, no smarty, just straight mixed up, stirred, PHP and html.  That is exactly what it was.  PHP with a bunch of echos everywhere to display the html dynamically.<span id="more-300"></span></p>
<p>Wow, what a mess.  Sad part is that we still see people doing it today and the unfortunate thing is that web solution visionaries end up with unsatisfactory and unmanageable web applications.   We of course refuse to take on any such project.</p>
<p>So, this article is aimed towards developers looking for a framework, developers with no direction yet looking for some, and the web visionaries who just are not sure what direction they should head when looking for a developer.</p>
<p>First off, Loadsys uses CakePHP.  I’m not going to get into technicals here, but CakePHP is a rapid application development framework that provides “rules” if you will for a developer to follow to keep a web application structured.  It comes with a suite of utilities and helpers that make things that seemed difficult or frustrating before, a breeze.</p>
<p><strong>Cake offers the following benefits </strong></p>
<ul style="list-style-type: disc; margin-left: 15px;">
<li>Rapid development framework that will speed up development time for a developer that is experienced with the framework</li>
<li>Well-structured code (most of the time)</li>
<li>Programming logic separate from design</li>
<li>Less new developer “Getting Familiar” time</li>
<li>Built-in utilities and helpers (no wheel re-inventing)</li>
<li>Large and enthusiastic developer base</li>
</ul>
<p>A web application needs a framework and in our opinion it should be a well-established one like CakePHP.   Now, please consider what I’m saying.  I said “Like” CakePHP.  We realize there are other frameworks out there.  Some achieve the same result as CakePHP.  For example, there is Ruby on Rails, who’s concept was created by 37 signals.  There are other frameworks out there as well.  These are all good and put developers in the right direction of structured coding.</p>
<p><strong>I’m stuck between choosing Ruby On Rails and CakePHP, which one is better?</strong></p>
<p>We have had this question asked by multiple clients.  There are times when we are competing for bid between us and a Ruby developer.  Whenever I get asked this question, I’m very honest.  I say, &#8220;There is not really a difference&#8221;.  Maybe this isn’t good for business, but in actuality there isn’t.  Maybe Ruby has some tools that Cake doesn’t have, or vice versa.  But at the end of the day, I’m sure that the client would have a well-structured web application in both scenarios.  Whether it is Ruby on Rails or CakePHP.</p>
<p>The web development realm has evolved into some smart people doing some amazing things.  They do this by learning from mistakes.  I’m hoping this article puts a young developer or even a person drawing up plans for a new web application to follow the movement towards well-architected web applications</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html&amp;title=Using+CakePHP+Framework+for+Web+Development" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html&amp;title=Using+CakePHP+Framework+for+Web+Development" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html&amp;title=Using+CakePHP+Framework+for+Web+Development&amp;desc=dMarkWeb%20has%20been%20in%20business%20for%20a%20while.%C2%A0%20Building%20and%20designing%20web%20applications%20using%20PHP.%C2%A0%20We%20initially%20started%20building%20site%20management%20systems%20using%20our%20own%20developed%20file%20structure.%C2%A0%20No%20templates%2C%20no%20smarty%2C%20just%20straight%20mixed%20up%2C%20stirred%2C%20PHP%20and%20html.%C2%A0%20That%20is%20exactly%20what%20it%20was.%C2%A0%20P" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html&amp;bm_description=Using+CakePHP+Framework+for+Web+Development&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html&amp;title=Using+CakePHP+Framework+for+Web+Development" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html&amp;title=Using+CakePHP+Framework+for+Web+Development" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html&amp;title=Using+CakePHP+Framework+for+Web+Development" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Using+CakePHP+Framework+for+Web+Development+-+http://b2l.me/r57bg&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/using-cakephp-framework-for-web-development.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Maintenance</title>
		<link>http://www.dmarkweb.com/website-maintenance.html</link>
		<comments>http://www.dmarkweb.com/website-maintenance.html#comments</comments>
		<pubDate>Mon, 26 Apr 2010 21:33:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Slider]]></category>
		<category><![CDATA[website Maintanance Services]]></category>
		<category><![CDATA[Website Maintenance]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=290</guid>
		<description><![CDATA[Website Maintenance You cannot let your website stagnate. Your website needs regular bug fixing, content upgrades, link validation and fresh designs to stay ahead of competition. We offer you comprehensive website maintenance that fixes every issue and keeps your website sparkling new. Subscribe to the comments for this post? Share this on del.icio.us Digg this! [...]]]></description>
			<content:encoded><![CDATA[<div class="articleHolder">
<div class="headerText">
<div class="headerTitle">
<h1>Website Maintenance</h1>
</div>
<p><img class="btn-plus" src="http://www.dmarkweb.com/wp-content/themes/dmark/images/btn_plus.gif" border="0" alt="View More" width="41" height="41" /></p>
<p class="headerTextSmall">You cannot let your website stagnate. Your website needs regular bug fixing, content upgrades, link validation and fresh designs to stay ahead of competition. We offer you comprehensive website maintenance that fixes every issue and keeps your website sparkling new.</p>
<div class="headerButtons">
<div class="headerButton1"><a href="#"></a></div>
<div class="headerButton2"><a href="#"></a></div>
</div>
</div>
<p><!--image slider--></p>
<div class="imageWrapper">
<div class="staticImageHolder"><a href="#"><img src="http://www.dmarkweb.com/wp-content/uploads/2010/04/MaintMana.jpg" alt="Website Maintenance Services" title="Website Maintenance" width="347" height="346" class="alignnone size-full wp-image-293" /></a></div>
</div>
</div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/website-maintenance.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/website-maintenance.html&amp;title=Website+Maintenance" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/website-maintenance.html&amp;title=Website+Maintenance" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/website-maintenance.html&amp;title=Website+Maintenance&amp;desc=%0D%0A%0D%0A%0D%0AWebsite%20Maintenance%0D%0A%0D%0A%0D%0AYou%20cannot%20let%20your%20website%20stagnate.%20Your%20website%20needs%20regular%20bug%20fixing%2C%20content%20upgrades%2C%20link%20validation%20and%20fresh%20designs%20to%20stay%20ahead%20of%20competition.%20We%20offer%20you%20comprehensive%20website%20maintenance%20that%20fixes%20every%20issue%20and%20keeps%20your%20website%20sparkling%20new.%0D%0A%0D" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/website-maintenance.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/website-maintenance.html&amp;bm_description=Website+Maintenance&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/website-maintenance.html&amp;title=Website+Maintenance" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/website-maintenance.html&amp;title=Website+Maintenance" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/website-maintenance.html&amp;title=Website+Maintenance" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/website-maintenance.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Website+Maintenance+-+http://b2l.me/rjwjy&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/website-maintenance.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ecommerce Development</title>
		<link>http://www.dmarkweb.com/ecommerce-development.html</link>
		<comments>http://www.dmarkweb.com/ecommerce-development.html#comments</comments>
		<pubDate>Mon, 26 Apr 2010 21:31:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Slider]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=287</guid>
		<description><![CDATA[Ecommerce Development We offer customized e-commerce web design services of all scopes and complexities. From a small online store selling a few books to mammoth online businesses retailing thousands of products. Subscribe to the comments for this post? Share this on del.icio.us Digg this! Post this on Diigo Post on Google Buzz Add this to [...]]]></description>
			<content:encoded><![CDATA[<div class="articleHolder">
<div class="headerText">
<div class="headerTitle">
<h1>Ecommerce Development</h1>
</div>
<p><img class="btn-plus" src="http://www.dmarkweb.com/wp-content/themes/dmark/images/btn_plus.gif" border="0" alt="View More" width="41" height="41" /></p>
<p class="headerTextSmall">We offer customized e-commerce web design services of all scopes and complexities. From a small online store selling a few books to mammoth online businesses retailing thousands of products.</p>
<div class="headerButtons">
<div class="headerButton1"><a href="#"></a></div>
<div class="headerButton2"><a href="#"></a></div>
</div>
</div>
<p><!--image slider--></p>
<div class="imageWrapper">
<div class="staticImageHolder"><a href="http://www.dmarkweb.com/?attachment_id=296"><img src="http://www.dmarkweb.com/wp-content/uploads/2010/04/shopping_cart-1.png" alt="Ecommerce Development" title="Ecommerce Development" width="400" height="400" class="alignnone size-full wp-image-296" /></a></div>
</div>
</div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/ecommerce-development.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/ecommerce-development.html&amp;title=Ecommerce+Development" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/ecommerce-development.html&amp;title=Ecommerce+Development" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/ecommerce-development.html&amp;title=Ecommerce+Development&amp;desc=%0D%0A%0D%0A%0D%0AEcommerce%20Development%0D%0A%0D%0A%0D%0AWe%20offer%20customized%20e-commerce%20web%20design%20services%20of%20all%20scopes%20and%20complexities.%20From%20a%20small%20online%20store%20selling%20a%20few%20books%20to%20mammoth%20online%20businesses%20retailing%20thousands%20of%20products.%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/ecommerce-development.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/ecommerce-development.html&amp;bm_description=Ecommerce+Development&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/ecommerce-development.html&amp;title=Ecommerce+Development" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/ecommerce-development.html&amp;title=Ecommerce+Development" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/ecommerce-development.html&amp;title=Ecommerce+Development" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/ecommerce-development.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Ecommerce+Development+-+http://b2l.me/rjwj3&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/ecommerce-development.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Offshore Outsourcing</title>
		<link>http://www.dmarkweb.com/offshore-outsourcing.html</link>
		<comments>http://www.dmarkweb.com/offshore-outsourcing.html#comments</comments>
		<pubDate>Mon, 26 Apr 2010 21:20:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Slider]]></category>
		<category><![CDATA[Offshore Outsourcing]]></category>
		<category><![CDATA[Outsourcing Company]]></category>

		<guid isPermaLink="false">http://www.dmarkweb.com/?p=283</guid>
		<description><![CDATA[Offshore Outsourcing Offshore outsourcing lets you delegate your workload helping you focus on your business, cut costs and grow faster than ever! As per the statistics release by National Association of Software and Service Companies (India), there has been a 34% growth within software services export from India. Subscribe to the comments for this post? [...]]]></description>
			<content:encoded><![CDATA[<div class="articleHolder">
<div class="headerText">
<div class="headerTitle">
<h1>Offshore Outsourcing</h1>
</div>
<p><img class="btn-plus" src="http://www.dmarkweb.com/wp-content/themes/dmark/images/btn_plus.gif" border="0" alt="View More" width="41" height="41" /></p>
<p class="headerTextSmall">Offshore outsourcing lets you delegate your workload helping you focus on your business, cut costs and grow faster than ever!<br />
As per the statistics release by National Association of Software and Service Companies (India), there has been a 34% growth within software services export from India.</p>
<div class="headerButtons">
<div class="headerButton1"><a href="#"></a></div>
<div class="headerButton2"><a href="#"></a></div>
</div>
</div>
<p><!--image slider--></p>
<div class="imageWrapper">
<div class="staticImageHolder"><a href="http://www.dmarkweb.com/offshore-outsourcing.html/outsourcing_at_dmarkweb-com" rel="attachment wp-att-280"><img src="http://www.dmarkweb.com/wp-content/uploads/2010/04/outsourcing_at_dMarkweb.com_.jpg" alt="OutSourcing at dmarkWeb.com" title="outsourcing_at_dMarkweb.com" width="423" height="300" class="alignnone size-full wp-image-280" /></a></div>
</div>
</div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.dmarkweb.com/offshore-outsourcing.html/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.dmarkweb.com/offshore-outsourcing.html&amp;title=Offshore+Outsourcing" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.dmarkweb.com/offshore-outsourcing.html&amp;title=Offshore+Outsourcing" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.dmarkweb.com/offshore-outsourcing.html&amp;title=Offshore+Outsourcing&amp;desc=%0D%0A%0D%0A%0D%0AOffshore%20Outsourcing%0D%0A%0D%0A%0D%0AOffshore%20outsourcing%20lets%20you%20delegate%20your%20workload%20helping%20you%20focus%20on%20your%20business%2C%20cut%20costs%20and%20grow%20faster%20than%20ever%21%0D%0AAs%20per%20the%20statistics%20release%20by%20National%20Association%20of%20Software%20and%20Service%20Companies%20%28India%29%2C%20there%20has%20been%20a%2034%25%20growth%20within%20software%20" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.dmarkweb.com/offshore-outsourcing.html&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.dmarkweb.com/offshore-outsourcing.html&amp;bm_description=Offshore+Outsourcing&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.dmarkweb.com/offshore-outsourcing.html&amp;title=Offshore+Outsourcing" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.dmarkweb.com/offshore-outsourcing.html&amp;title=Offshore+Outsourcing" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.dmarkweb.com/offshore-outsourcing.html&amp;title=Offshore+Outsourcing" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.dmarkweb.com/offshore-outsourcing.html" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Offshore+Outsourcing+-+http://b2l.me/rjwju&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.dmarkweb.com/offshore-outsourcing.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

