<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Shahriat's Blog</title>
	<atom:link href="http://shahriat.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahriat.wordpress.com</link>
	<description>My Experience Lists</description>
	<lastBuildDate>Tue, 19 May 2009 04:34:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='shahriat.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Shahriat's Blog</title>
		<link>http://shahriat.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://shahriat.wordpress.com/osd.xml" title="Shahriat&#039;s Blog" />
	<atom:link rel='hub' href='http://shahriat.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to check dynamic group checkbox?</title>
		<link>http://shahriat.wordpress.com/2009/04/06/how-to-check-dynamic-group-checkbox/</link>
		<comments>http://shahriat.wordpress.com/2009/04/06/how-to-check-dynamic-group-checkbox/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 10:06:21 +0000</pubDate>
		<dc:creator>shahriat</dc:creator>
				<category><![CDATA[Jquery + Dynamic]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[jQuery checkbox]]></category>
		<category><![CDATA[jQuery group checkbox]]></category>

		<guid isPermaLink="false">http://shahriat.wordpress.com/?p=41</guid>
		<description><![CDATA[Suppose that I have an admin panel and there have a content management system. And contents are belong to  categories. Each category may have lots of contents and I want to delete the contents of each category separately. To make it possible first we will make an interface so that anybody can understand what is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=41&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Suppose that I have an admin panel and there have a content management system. And contents are belong to  categories. Each category may have lots of contents and I want to delete the contents of each category separately. To make it possible first we will make an interface so that anybody can understand what is going to be happened through this post.</p>
<p>&lt;ul&gt;</p>
<p>&lt;li&gt;<br />
&lt;input type=&#8221;checkbox&#8221; id=&#8221;category_id1&#8243; /&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;input id=&#8221;content_id1&#8243; name=&#8221;catgroup_id1&#8243; type=&#8221;checkbox&#8221; /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;input id=&#8221;content_id2&#8243; name=&#8221;catgroup_id1&#8243; type=&#8221;checkbox&#8221; /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;input id=&#8221;content_id3&#8243; name=&#8221;catgroup_id1&#8243; type=&#8221;checkbox&#8221; /&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;li&gt; &lt;input id=&#8221;category_id2&#8243; type=&#8221;checkbox&#8221; /&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;input id=&#8221;content_id4&#8243; name=&#8221;catgroup_id2&#8243; type=&#8221;checkbox&#8221; /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;input id=&#8221;content_id5&#8243; name=&#8221;catgroup_id2&#8243; type=&#8221;checkbox&#8221; /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;input id=&#8221;content_id6&#8243; name=&#8221;catgroup_id2&#8243; type=&#8221;checkbox&#8221; /&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;</p>
<p>If we extend the above code then the format becomes like below -<br />
&lt;ul&gt; Content_model-&amp;gt;getContentsByParent($category-&amp;gt;cate_id);<br />
?&amp;gt;<br />
&lt;li&gt; &lt;input id=&#8221;category_&amp;lt;?=$category-&amp;gt;cate_id?&amp;gt;&#8221; onclick=&#8221;checkGroupBox(&#8216;&amp;lt;?=$category-&amp;gt;cate_id?&amp;gt;&#8217;)&#8221; type=&#8221;checkbox&#8221; /&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;input id=&#8221;content_&amp;lt;?=$content-&amp;gt;content_id?&amp;gt;&#8221; name=&#8221;catgroup_&amp;lt;?=$category-&amp;gt;cate_id?&amp;gt;&#8221; type=&#8221;checkbox&#8221; /&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>and after above done here is our jQuery code to check the group checkbox below -</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;&lt;!&#8211;<br />
function checkGroupBox(id){<br />
var groupname = &#8216;catgroup_&#8217;+id;<br />
var checkedvalue = $(&#8216;#category_&#8217;+id).attr(&#8216;checked&#8217;) ? &#8216;checked&#8217; : &#8221;;<br />
$(&#8216;input[name='+groupname+']&#8216;).attr(&#8216;checked&#8217;, checkedvalue);<br />
}<br />
// &#8211;&gt;&lt;/script&gt;</p>
<p>You must link  jQuery core file to use this jQuery code that I have done on my some of last post. I have also used CodeIgniter&#8217;s code here and iterative looping system but you can use recursive function instead of iterative looping system which is advanced technique and more flexible. I will post some tutorials using recursive function in the future.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shahriat.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shahriat.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shahriat.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shahriat.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shahriat.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shahriat.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shahriat.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shahriat.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shahriat.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shahriat.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shahriat.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shahriat.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shahriat.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shahriat.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=41&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shahriat.wordpress.com/2009/04/06/how-to-check-dynamic-group-checkbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3efa224d6f7d6e23785b84fdd43d3514?s=96&#38;d=identicon" medium="image">
			<media:title type="html">shahriat</media:title>
		</media:content>
	</item>
		<item>
		<title>A simple trick to add static content block in template</title>
		<link>http://shahriat.wordpress.com/2009/03/28/simple-trick-to-add-static-content-block-in-template/</link>
		<comments>http://shahriat.wordpress.com/2009/03/28/simple-trick-to-add-static-content-block-in-template/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 07:08:37 +0000</pubDate>
		<dc:creator>shahriat</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[how to create magento static page]]></category>
		<category><![CDATA[magento block customization]]></category>
		<category><![CDATA[magento static block]]></category>
		<category><![CDATA[magento template]]></category>
		<category><![CDATA[magento theme]]></category>
		<category><![CDATA[magento theme customization]]></category>
		<category><![CDATA[magento tutorial]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://shahriat.wordpress.com/?p=32</guid>
		<description><![CDATA[Just go to your magento admin panel and then CMS -&#62; Static Blocks Now click on Add New Block button below and there will be a New Block form with some required fields. Now fill up all the required fields and save. Congrats! you have created your new static block . You have an identifier [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=32&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just go to your magento admin panel and then CMS -&gt; Static Blocks</p>
<p>Now click on Add New Block button below and there will be a New Block form with some required fields. Now fill up all the required fields and save. Congrats! you have created your new static block . You have an identifier for your static block that you should remember for the next step. Now you can call your static block using the code below</p>
<p>&lt;?php<br />
echo $this-&gt;getLayout()-&gt;createBlock(&#8216;cms/block&#8217;)-&gt;<br />
setBlockId(&#8216;yourIdentifierNameHere&#8217;)-&gt;toHtml()<br />
?&gt;</p>
<p>at anywhere in your template. You must replace setBlockId(&#8216;<span style="color:#008080;">yourIdentifierNameHere</span>&#8216;) &#8220;YourIdentifierNameHere&#8221; with your created  Static Block&#8217;s  identifier name.</p>
<p>[It may help you <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shahriat.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shahriat.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shahriat.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shahriat.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shahriat.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shahriat.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shahriat.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shahriat.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shahriat.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shahriat.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shahriat.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shahriat.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shahriat.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shahriat.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=32&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shahriat.wordpress.com/2009/03/28/simple-trick-to-add-static-content-block-in-template/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3efa224d6f7d6e23785b84fdd43d3514?s=96&#38;d=identicon" medium="image">
			<media:title type="html">shahriat</media:title>
		</media:content>
	</item>
		<item>
		<title>A simple trick to apply alternate css class part 1</title>
		<link>http://shahriat.wordpress.com/2009/03/27/a-simple-trick-to-apply-alternate-css-class-part-1/</link>
		<comments>http://shahriat.wordpress.com/2009/03/27/a-simple-trick-to-apply-alternate-css-class-part-1/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 06:18:59 +0000</pubDate>
		<dc:creator>shahriat</dc:creator>
				<category><![CDATA[Jquery + Dynamic]]></category>
		<category><![CDATA[add class by jquery]]></category>
		<category><![CDATA[alternate css]]></category>
		<category><![CDATA[apply css on dymanic data]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[jquery addClass method]]></category>
		<category><![CDATA[jquery basic filter]]></category>
		<category><![CDATA[jquery last row select]]></category>
		<category><![CDATA[simple trick to css]]></category>
		<category><![CDATA[simple trick to dynamic data]]></category>

		<guid isPermaLink="false">http://shahriat.wordpress.com/?p=25</guid>
		<description><![CDATA[In our professional work sometimes we  need to apply some simple trick to overcome complexity when retrieving data from database and showing those on user interface using loop. Suppose that we have some data from database and showing them using loop on our interface like below - First one we have designed static so that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=25&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In our professional work sometimes we  need to apply some simple trick to overcome complexity when retrieving data from database and showing those on user interface using loop.</p>
<p>Suppose that we have some data from database and showing them using loop on our interface like below -</p>
<p>First one we have designed static so that we can understand the format</p>
<p>&lt;table&gt;<br />
&lt;thead&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; Username &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/thead&gt;<br />
&lt;tbody&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Shahriat&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Hossain&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Somel&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/tbody&gt;<br />
&lt;/table&gt;</p>
<p>Now we will apply some style here -</p>
<p>table tbody tr<br />
{<br />
background: url(../img/tbody_tr_bg.png) repeat-x left bottom;<br />
}</p>
<p>After applying style we can get the output -</p>
<p>Shahriat<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.  // dotted is the png image in our style<br />
Hossain<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br />
Somel<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p>Isn&#8217;t it very odd to look at our design has broken ? Certainly under Somel  dotted (&#8230;..)  should not be there. It will be then design broken issue. It can be solved if we keep the design static as it is adding extra class at the last row. But what about when we make it dynamic using loop retrieving data from database like below -</p>
<p>foreach($a as $k=&gt;$v){<br />
echo&#8217;&lt;tr&gt;&#8217;;<br />
echo&#8217;&lt;td&gt;&#8217;.$v.&#8217;&lt;/td&gt;&#8217;;<br />
echo&#8217;&lt;/tr&gt;&#8217;;<br />
}</p>
<p>Jquery is our best friend here to solve this type of problem and now we will go with a simple example here -</p>
<p>$(&#8220;tr:last&#8221;).addClass(&#8220;no_bg&#8221;);</p>
<p>We have added a class no_bg using Jquery addClass method at the last row of table. Here (:last) is one of the Jquery basic filter which finds the last row of table. Its a single code isn&#8217;t it and after all getting out here is our complete code -</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&gt;<br />
&lt;title&gt;Untitled Document&lt;/title&gt;</p>
<pre>&lt;script src="<a class="external free" title="http://code.jquery.com/jquery-latest.js" href="http://code.jquery.com/jquery-latest.js">http://code.jquery.com/jquery-latest.js</a>"&gt;&lt;/script&gt;</pre>
<p>&lt;script&gt;<br />
$(document).ready(function(){<br />
$(&#8220;tr:last&#8221;).addClass(&#8220;no_bg&#8221;);<br />
});<br />
&lt;/script&gt;<br />
&lt;style&gt;<br />
table tbody tr {<br />
background: url(../img/tbody_tr_bg.png) repeat-x left bottom;<br />
}<br />
.no_bg {<br />
background: none !important;<br />
}<br />
&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;table&gt;<br />
&lt;thead&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; Username &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/thead&gt;<br />
&lt;tbody&gt;<br />
&lt;?php<br />
foreach($a as $k=&gt;$v){<br />
echo&#8217;&lt;tr&gt;&#8217;;<br />
echo&#8217;&lt;td&gt;&#8217;.$v.&#8217;&lt;/td&gt;&#8217;;<br />
echo&#8217;&lt;/tr&gt;&#8217;;<br />
}<br />
?&gt;<br />
&lt;/tbody&gt;<br />
&lt;/table&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>and the output is -</p>
<p>Shahriat<br />
&#8230;&#8230;&#8230;&#8230;&#8230;..<br />
Hossain<br />
&#8230;&#8230;&#8230;&#8230;&#8230;.<br />
Somel<br />
// no background image (&#8230;&#8230;&#8230;..) here</p>
<p>[It may help you <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shahriat.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shahriat.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shahriat.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shahriat.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shahriat.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shahriat.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shahriat.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shahriat.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shahriat.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shahriat.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shahriat.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shahriat.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shahriat.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shahriat.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=25&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shahriat.wordpress.com/2009/03/27/a-simple-trick-to-apply-alternate-css-class-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3efa224d6f7d6e23785b84fdd43d3514?s=96&#38;d=identicon" medium="image">
			<media:title type="html">shahriat</media:title>
		</media:content>
	</item>
		<item>
		<title>URI Routing</title>
		<link>http://shahriat.wordpress.com/2009/03/25/uri-routing/</link>
		<comments>http://shahriat.wordpress.com/2009/03/25/uri-routing/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 10:58:52 +0000</pubDate>
		<dc:creator>shahriat</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[codeigniter uri routing rules]]></category>
		<category><![CDATA[how to control query strings by uri rerouting]]></category>
		<category><![CDATA[pass query strings by uri routing]]></category>
		<category><![CDATA[rearrange url]]></category>
		<category><![CDATA[routing rules]]></category>
		<category><![CDATA[uri]]></category>
		<category><![CDATA[uri rerouting]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[url rewrite]]></category>
		<category><![CDATA[url segments reducing]]></category>

		<guid isPermaLink="false">http://shahriat.wordpress.com/?p=17</guid>
		<description><![CDATA[Uniform Resource Identifier or URI consists of a string of character used to name a resource on the Internet. The name of a resource on the Internet should be naming conventional so that Search Engine like google , yahoo, ask etc. can easily find out. And it can be possible if we arrange the URI [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=17&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Uniform Resource Identifier or</strong> <strong>URI </strong> consists of a string of character used to  name a resource on the Internet. The name of a resource on the Internet should be naming conventional so that Search Engine like google , yahoo, ask etc. can easily find out. And it can be possible if we arrange the URI perfectly following some rules of URI Routing. In CodeIgniter the segments in a URI normally follow a pattern like this -</p>
<p>www.mysite.com/myclass/myfunction/myparam</p>
<p>Suppose that we have a URL like below -</p>
<p>http://localhost/TestingServer/home/chidc/mid/4/sid/11/chid/12</p>
<p>where &#8220;http://localhost/TestingServer/&#8221;  is our BASE URL  and others are segments. If we describe the above URI following the CodeIgniter pattern -</p>
<p>http://localhost/TestingServer/home(myclass)/chidc(myfunction)/mid(paramname1)/4(paramvalue1)/sid(paramname2)/11(paramvalue2)/chid(paramname3)/12(paramvalue3)</p>
<p>Now we will apply our own routing rules to the above URL.</p>
<p>In CodeIgniter routing rules are defined <var></var>in application/config/routes.php file.</p>
<p>// routes.php</p>
<p>&lt;?php  if ( ! defined(&#8216;BASEPATH&#8217;)) exit(&#8216;No direct script access allowed&#8217;);<br />
/*<br />
| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| URI ROUTING<br />
| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| This file lets you re-map URI requests to specific controller functions.<br />
|<br />
| Typically there is a one-to-one relationship between a URL string<br />
| and its corresponding controller class/method. The segments in a<br />
| URL normally follow this pattern:<br />
|<br />
|     example.com/class/method/id/<br />
|<br />
| In some instances, however, you may want to remap this relationship<br />
| so that a different class/function is called than the one<br />
| corresponding to the URL.<br />
|<br />
| Please see the user guide for complete details:<br />
|<br />
|    http://codeigniter.com/user_guide/general/routing.html<br />
|<br />
| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| RESERVED ROUTES<br />
| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|<br />
| There are two reserved routes:<br />
|<br />
|    $route['default_controller'] = &#8216;welcome&#8217;;<br />
|<br />
| This route indicates which controller class should be loaded if the<br />
| URI contains no data. In the above example, the &#8220;welcome&#8221; class<br />
| would be loaded.<br />
|<br />
|    $route['scaffolding_trigger'] = &#8216;scaffolding&#8217;;<br />
|<br />
| This route lets you set a &#8220;secret&#8221; word that will trigger the<br />
| scaffolding feature for added security. Note: Scaffolding must be<br />
| enabled in the controller in which you intend to use it.   The reserved<br />
| routes must come before any wildcard or regular expression routes.<br />
|<br />
*/</p>
<p>$route['default_controller'] = &#8220;home&#8221;;<br />
$route['scaffolding_trigger'] = &#8220;&#8221;;</p>
<p>/* End of file routes.php */<br />
/* Location: ./system/application/config/routes.php */</p>
<p>?&gt;</p>
<p>Here $route is an array by which we can specify our own routing rules. Now we are going to specify our own routing rules below -</p>
<p>$route['childmenu/([0-9]+)/([0-9]+)/([0-9]+)&#8217;] = &#8220;home/chidc/mid/$1/sid/$2/chid/$3&#8243;;</p>
<p>Here segments childmenu and regular expressions will be remapped to the  &#8216;home&#8217; class ,  &#8216;chidc&#8217; function and three params value &#8216;mid&#8217;, &#8216;sid&#8217;, &#8216;chid&#8217;.</p>
<p>By adding above code to routes.php file -</p>
<p>// modified routes.php</p>
<p>&lt;?php  if ( ! defined(&#8216;BASEPATH&#8217;)) exit(&#8216;No direct script access allowed&#8217;);<br />
/*<br />
| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| URI ROUTING<br />
| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| This file lets you re-map URI requests to specific controller functions.<br />
|<br />
| Typically there is a one-to-one relationship between a URL string<br />
| and its corresponding controller class/method. The segments in a<br />
| URL normally follow this pattern:<br />
|<br />
|     example.com/class/method/id/<br />
|<br />
| In some instances, however, you may want to remap this relationship<br />
| so that a different class/function is called than the one<br />
| corresponding to the URL.<br />
|<br />
| Please see the user guide for complete details:<br />
|<br />
|    http://codeigniter.com/user_guide/general/routing.html<br />
|<br />
| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| RESERVED ROUTES<br />
| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|<br />
| There are two reserved routes:<br />
|<br />
|    $route['default_controller'] = &#8216;welcome&#8217;;<br />
|<br />
| This route indicates which controller class should be loaded if the<br />
| URI contains no data. In the above example, the &#8220;welcome&#8221; class<br />
| would be loaded.<br />
|<br />
|    $route['scaffolding_trigger'] = &#8216;scaffolding&#8217;;<br />
|<br />
| This route lets you set a &#8220;secret&#8221; word that will trigger the<br />
| scaffolding feature for added security. Note: Scaffolding must be<br />
| enabled in the controller in which you intend to use it.   The reserved<br />
| routes must come before any wildcard or regular expression routes.<br />
|<br />
*/</p>
<p>$route['default_controller'] = &#8220;home&#8221;;<br />
$route['scaffolding_trigger'] = &#8220;&#8221;;</p>
<p>// Customized routing rules<br />
$route['childmenu/([0-9]+)/([0-9]+)/([0-9]+)&#8217;] = &#8220;home/chidc/mid/$1/sid/$2/chid/$3&#8243;;<br />
/* End of file routes.php */<br />
/* Location: ./system/application/config/routes.php */</p>
<p>?&gt;</p>
<p>Below we will go to the  finished step for view -</p>
<p>// view.php</p>
<p>&lt;a href=&#8221;&lt;?=base_url()?&gt;childmenu/&lt;?=$id1?&gt;/&lt;?=$id2?&gt;/&lt;?=$id3?&gt;&#8221;&gt;Menu name&lt;/a&gt;</p>
<p>[ It may help you <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shahriat.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shahriat.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shahriat.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shahriat.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shahriat.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shahriat.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shahriat.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shahriat.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shahriat.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shahriat.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shahriat.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shahriat.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shahriat.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shahriat.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=17&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shahriat.wordpress.com/2009/03/25/uri-routing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3efa224d6f7d6e23785b84fdd43d3514?s=96&#38;d=identicon" medium="image">
			<media:title type="html">shahriat</media:title>
		</media:content>
	</item>
		<item>
		<title>Refresh particular div by jquery</title>
		<link>http://shahriat.wordpress.com/2009/03/19/refresh-particular-div-by-jquery/</link>
		<comments>http://shahriat.wordpress.com/2009/03/19/refresh-particular-div-by-jquery/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:43:46 +0000</pubDate>
		<dc:creator>shahriat</dc:creator>
				<category><![CDATA[Jquery + Dynamic]]></category>
		<category><![CDATA[auto refresh by jquery]]></category>
		<category><![CDATA[auto refresh div]]></category>
		<category><![CDATA[freelancer]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[jquery ajax]]></category>
		<category><![CDATA[jquery expert]]></category>
		<category><![CDATA[jquery freelancer]]></category>
		<category><![CDATA[jquery programmer]]></category>
		<category><![CDATA[php freelancer]]></category>
		<category><![CDATA[php programmer]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[refresh div]]></category>
		<category><![CDATA[shahriat]]></category>
		<category><![CDATA[shahriat hossain]]></category>
		<category><![CDATA[shahriat hossain somel]]></category>
		<category><![CDATA[somel]]></category>
		<category><![CDATA[web application developer]]></category>
		<category><![CDATA[web developer]]></category>

		<guid isPermaLink="false">http://shahriat.wordpress.com/?p=11</guid>
		<description><![CDATA[First we will make a customize function called getRefresh() - function getRefresh(){ $(&#8220;#auto&#8221;).load(&#8220;data.php&#8221;, &#8221;, callback); } Here we have used load( url, [data], [callback] ) ajax api. This api load HTML output  from a remote file (data.php) and inject it into the div (auto). Below we have created a callback function named callback() - function callback(){ setTimeout(&#8220;getRefresh();&#8221;, 1000); [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=11&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First we will make a customize function called getRefresh() -</p>
<p>function getRefresh(){</p>
<p>$(&#8220;#auto&#8221;).load(&#8220;data.php&#8221;, &#8221;, callback);</p>
<p>}</p>
<p>Here we have used <strong class="selflink">load</strong>( url, <span class="optional">[</span>data<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> ) ajax api. This api load HTML output  from a remote file (data.php) and inject it into the div (auto). Below we have created a callback function named callback() -</p>
<p>function callback(){</p>
<p>setTimeout(&#8220;getRefresh();&#8221;, 1000);</p>
<p>}</p>
<p>setTimeout() function is used  to call getRefresh() after a specified number of milliseconds (1000). Now we can add some jquery effect to realize that the div is refreshing automatically</p>
<p>function getRefresh(){</p>
<p>$(&#8220;#auto&#8221;).fadeIn(&#8220;slow&#8221;);</p>
<p>$(&#8220;#auto&#8221;).load(&#8220;data.php&#8221;, &#8221;, callback);</p>
<p>}</p>
<p>function callback(){</p>
<p>$(&#8220;#auto&#8221;).fadeOut(&#8220;slow&#8221;);</p>
<p>setTimeout(&#8220;getRefresh();&#8221;, 1000);</p>
<p>}</p>
<p>After all below is out complete code both for jquery and server scripting language -</p>
<p>// for jquery html</p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;script src=&#8221;http://code.jquery.com/jquery-latest.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function getRefresh() {<br />
$(&#8220;#auto&#8221;).fadeIn(&#8220;slow&#8221;);<br />
$(&#8220;#auto&#8221;).load(&#8220;data.php&#8221;, &#8221;, callback);<br />
}</p>
<p>function callback() {<br />
$(&#8220;#auto&#8221;).fadeOut(&#8220;slow&#8221;);<br />
setTimeout(&#8220;getRefresh();&#8221;, 1000);<br />
}<br />
$(document).ready(getRefresh);<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;Auto refresh div by jquery&lt;/h1&gt;<br />
&lt;div id=&#8221;auto&#8221;&gt;<br />
Random text goes here<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>// for php server scripting language</p>
<p>// data.php</p>
<p>&lt;?php<br />
mysql_connect(&#8220;localhost&#8221;, &#8220;root&#8221;, &#8220;&#8221;);<br />
mysql_select_db(&#8220;dbname&#8221;);<br />
$result = mysql_query(&#8220;select * from tblname&#8221;);<br />
while ($row = mysql_fetch_object($result)) {<br />
echo $row-&gt;username.&#8217;&lt;br/&gt;&#8217;;<br />
}<br />
mysql_free_result($result);<br />
?&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shahriat.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shahriat.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shahriat.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shahriat.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shahriat.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shahriat.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shahriat.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shahriat.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shahriat.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shahriat.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shahriat.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shahriat.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shahriat.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shahriat.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shahriat.wordpress.com&amp;blog=5476737&amp;post=11&amp;subd=shahriat&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shahriat.wordpress.com/2009/03/19/refresh-particular-div-by-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3efa224d6f7d6e23785b84fdd43d3514?s=96&#38;d=identicon" medium="image">
			<media:title type="html">shahriat</media:title>
		</media:content>
	</item>
	</channel>
</rss>
