<?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>Rony&#039;s &#187; Tips &amp; Tricks</title>
	<atom:link href="http://rony.creash.com.bd/category/tips-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://rony.creash.com.bd</link>
	<description>Blogor Blogor</description>
	<lastBuildDate>Fri, 26 Mar 2010 21:34:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using table in HTML and font size issue with IE</title>
		<link>http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/</link>
		<comments>http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 21:28:19 +0000</pubDate>
		<dc:creator>Rony</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[font-size]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=167</guid>
		<description><![CDATA[
I don&#8217;t really understand why people don&#8217;t like to use table these days. I&#8217;m not a wise HTML guru or something but as far I understand table is a pretty little thing with some handy features, which does my work without much trouble. At least as long as you don&#8217;t have a very complex layout [...]]]></description>
			<content:encoded><![CDATA[<p>
I don&#8217;t really understand why people don&#8217;t like to use table these days. I&#8217;m not a wise HTML guru or something but as far I understand table is a pretty little thing with some handy features, which does my work without much trouble. At least as long as you don&#8217;t have a very complex layout where it needs the use of several colspan and rowspans, table is really handy. I don&#8217;t have to bother about floats, breaking in browsers etc.
</p>
<p>
But there is a issue with the font size I faced in IE and Safari. If I define a font size in the parent element it doesn&#8217;t effect the content of the table. That was really confusing for me.
</p>
<p>
So, whenever using a table, it needs to define the font size for the table explicitely.</p>
<p><code><br />
table{ font-size: 12px; }<br />
</code></p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/_amp_title=Using+table+in+HTML+and+font+size+issue+with+IE&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;title=Using+table+in+HTML+and+font+size+issue+with+IE" title="Add 'Using table in HTML and font size issue with IE' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Using table in HTML and font size issue with IE' to Del.icio.us" alt="Add 'Using table in HTML and font size issue with IE' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/_amp_title=Using+table+in+HTML+and+font+size+issue+with+IE&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;title=Using+table+in+HTML+and+font+size+issue+with+IE" title="Add 'Using table in HTML and font size issue with IE' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Using table in HTML and font size issue with IE' to digg" alt="Add 'Using table in HTML and font size issue with IE' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/" title="Add 'Using table in HTML and font size issue with IE' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Using table in HTML and font size issue with IE' to Technorati" alt="Add 'Using table in HTML and font size issue with IE' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/_amp_title=Using+table+in+HTML+and+font+size+issue+with+IE&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;title=Using+table+in+HTML+and+font+size+issue+with+IE" title="Add 'Using table in HTML and font size issue with IE' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Using table in HTML and font size issue with IE' to Stumble Upon" alt="Add 'Using table in HTML and font size issue with IE' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/_amp_title=Using+table+in+HTML+and+font+size+issue+with+IE&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;title=Using+table+in+HTML+and+font+size+issue+with+IE" title="Add 'Using table in HTML and font size issue with IE' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Using table in HTML and font size issue with IE' to Google Bookmarks" alt="Add 'Using table in HTML and font size issue with IE' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=Using+table+in+HTML+and+font+size+issue+with+IE_amp_url=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Using+table+in+HTML+and+font+size+issue+with+IE&amp;url=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/" title="Add 'Using table in HTML and font size issue with IE' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Using table in HTML and font size issue with IE' to SlashDot" alt="Add 'Using table in HTML and font size issue with IE' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/_amp_t=Using+table+in+HTML+and+font+size+issue+with+IE&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;t=Using+table+in+HTML+and+font+size+issue+with+IE" title="Add 'Using table in HTML and font size issue with IE' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Using table in HTML and font size issue with IE' to FaceBook" alt="Add 'Using table in HTML and font size issue with IE' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=Using+table+in+HTML+and+font+size+issue+with+IE_amp_c=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Using+table+in+HTML+and+font+size+issue+with+IE&amp;c=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/" title="Add 'Using table in HTML and font size issue with IE' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Using table in HTML and font size issue with IE' to MySpace" alt="Add 'Using table in HTML and font size issue with IE' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/" title="Add 'Using table in HTML and font size issue with IE' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Using table in HTML and font size issue with IE' to Twitter" alt="Add 'Using table in HTML and font size issue with IE' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/_amp_title=Using+table+in+HTML+and+font+size+issue+with+IE_amp_srcURL=http_//rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/&amp;title=Using+table+in+HTML+and+font+size+issue+with+IE&amp;srcURL=http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/" title="Add 'Using table in HTML and font size issue with IE' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'Using table in HTML and font size issue with IE' to Google Buzz" alt="Add 'Using table in HTML and font size issue with IE' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/using-table-in-html-and-font-size-issue-with-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE8 Issue with CSS margin:0 auto</title>
		<link>http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/</link>
		<comments>http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 19:40:02 +0000</pubDate>
		<dc:creator>Rony</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[Margin]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=164</guid>
		<description><![CDATA[It is a common practice to use the CSS style &#8211; margin:0 auto to make a content centered. This very simple effect gave me a really hard time for last couple of days. This works pretty fine on FF-3.x, Opera-9.x, Safari-3.x, IE-6(!) and IE-7. But when I load it with IE-8, the element is left [...]]]></description>
			<content:encoded><![CDATA[<p>It is a common practice to use the CSS style &#8211; <span style="color: #888888;"><em>margin:0 auto</em></span> to make a content centered. This very simple effect gave me a really hard time for last couple of days. This works pretty fine on FF-3.x, Opera-9.x, Safari-3.x, IE-6(!) and IE-7. But when I load it with IE-8, the element is left aligned, not centered!!! I was just thundered and had not idea what to do.</p>
<p>So what was happening?! Is it another bug of IE-8 to make us hate it more?! Not exactly. After finding out what was happening, I think that was pretty much my fault and I can forgive IE for this one time. <img src='http://rony.creash.com.bd/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Enough bullshit, let&#8217;s come to the point. There are three possible solutions for this problem.</p>
<p>First one:</p>
<p>Make sure that the page header has this: <span style="color: #888888;"><em>&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.0 Transitional//EN&#8221; <span style="text-decoration: underline;"><strong>&#8220;http://www.w3.org/TR/html4/strict.dtd&#8221;</strong></span>&gt;<span id="more-164"></span></em></span></p>
<p>If we don&#8217;t say IE how to render the page, it may fail to render the page properly. Its foolish and all other browser can do it OK, but we can forgive IE for that.</p>
<p>Second one:</p>
<p>If the content where the style is added isn&#8217;t a block content (e.g. input element), this might happen. In that case adding <em><span style="color: #808080;">display:block</span></em> might work. Another way to work around in this case is put it inside a block content (e.g. div element) and set <em><span style="color: #808080;">text-align:center</span></em>. (I didn&#8217;t try this myself)</p>
<p>I can forgive IE for this too, as W3 also suggests that for non block element the rendering of <em><span style="color: #808080;">margin:0 auto</span></em> is undetermined.</p>
<p>Third one:</p>
<p>With the property <span style="color: #808080;"><em>margin: 0 auto</em></span> also define a width explicitly (e.g. <em><span style="color: #808080;">width:300px</span></em>) and this should work. I didn&#8217;t try this either as the first solution worked for me and didn&#8217;t have any more patience left.</p>
<p>If anyone have tried the second and third solution and found any certain result, let me know <img src='http://rony.creash.com.bd/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/_amp_title=IE8+Issue+with+CSS+margin_3A0+auto&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;title=IE8+Issue+with+CSS+margin%3A0+auto" title="Add 'IE8 Issue with CSS margin:0 auto' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'IE8 Issue with CSS margin:0 auto' to Del.icio.us" alt="Add 'IE8 Issue with CSS margin:0 auto' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/_amp_title=IE8+Issue+with+CSS+margin_3A0+auto&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;title=IE8+Issue+with+CSS+margin%3A0+auto" title="Add 'IE8 Issue with CSS margin:0 auto' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'IE8 Issue with CSS margin:0 auto' to digg" alt="Add 'IE8 Issue with CSS margin:0 auto' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/" title="Add 'IE8 Issue with CSS margin:0 auto' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'IE8 Issue with CSS margin:0 auto' to Technorati" alt="Add 'IE8 Issue with CSS margin:0 auto' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/_amp_title=IE8+Issue+with+CSS+margin_3A0+auto&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;title=IE8+Issue+with+CSS+margin%3A0+auto" title="Add 'IE8 Issue with CSS margin:0 auto' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'IE8 Issue with CSS margin:0 auto' to Stumble Upon" alt="Add 'IE8 Issue with CSS margin:0 auto' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/_amp_title=IE8+Issue+with+CSS+margin_3A0+auto&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;title=IE8+Issue+with+CSS+margin%3A0+auto" title="Add 'IE8 Issue with CSS margin:0 auto' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'IE8 Issue with CSS margin:0 auto' to Google Bookmarks" alt="Add 'IE8 Issue with CSS margin:0 auto' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=IE8+Issue+with+CSS+margin_3A0+auto_amp_url=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=IE8+Issue+with+CSS+margin%3A0+auto&amp;url=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/" title="Add 'IE8 Issue with CSS margin:0 auto' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'IE8 Issue with CSS margin:0 auto' to SlashDot" alt="Add 'IE8 Issue with CSS margin:0 auto' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/_amp_t=IE8+Issue+with+CSS+margin_3A0+auto&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;t=IE8+Issue+with+CSS+margin%3A0+auto" title="Add 'IE8 Issue with CSS margin:0 auto' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'IE8 Issue with CSS margin:0 auto' to FaceBook" alt="Add 'IE8 Issue with CSS margin:0 auto' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=IE8+Issue+with+CSS+margin_3A0+auto_amp_c=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=IE8+Issue+with+CSS+margin%3A0+auto&amp;c=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/" title="Add 'IE8 Issue with CSS margin:0 auto' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'IE8 Issue with CSS margin:0 auto' to MySpace" alt="Add 'IE8 Issue with CSS margin:0 auto' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/" title="Add 'IE8 Issue with CSS margin:0 auto' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'IE8 Issue with CSS margin:0 auto' to Twitter" alt="Add 'IE8 Issue with CSS margin:0 auto' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/_amp_title=IE8+Issue+with+CSS+margin_3A0+auto_amp_srcURL=http_//rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/&amp;title=IE8+Issue+with+CSS+margin%3A0+auto&amp;srcURL=http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/" title="Add 'IE8 Issue with CSS margin:0 auto' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'IE8 Issue with CSS margin:0 auto' to Google Buzz" alt="Add 'IE8 Issue with CSS margin:0 auto' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/ie8-issue-with-css-margin0-auto/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get image data from client side using javascript</title>
		<link>http://rony.creash.com.bd/get-image-data-using-javascript/</link>
		<comments>http://rony.creash.com.bd/get-image-data-using-javascript/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 19:02:17 +0000</pubDate>
		<dc:creator>Rony</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Image]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=151</guid>
		<description><![CDATA[Well, I had a requirement to show a preview of image, whenever client selects an image inside a form. First I thought it was just a easy task&#8230; But it really took about one hour of me to figure the way out&#8230;
As it was an input element with type=file, I simply tried to get the [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I had a requirement to show a preview of image, whenever client selects an image inside a form. First I thought it was just a easy task&#8230; But it really took about one hour of me to figure the way out&#8230;</p>
<p>As it was an input element with type=file, I simply tried to get the value and push it to an image element&#8217;s source attribute attaching &#8216;file://&#8217; at the beginning. But life&#8217;s not that easy! The value only returns the file name not the full path. How can I get the full path??!! I can see the path on the input box, but I can&#8217;t get it!!!</p>
<p>Next approach, go to our best friend, Google! Well, I guess she wasn&#8217;t very pleased with me and didn&#8217;t help me very much&#8230;</p>
<p>Now what?! Well, let&#8217;s try the DOM inspector of Firefox. There I found three functions for the file input element.</p>
<ul>
<li>getAsBinary()</li>
<li>getAsDataURL()</li>
<li>getAsText()</li>
</ul>
<p>They are all self explanatory&#8230; My head was already stuck at that moment. So I didn&#8217;t see the &#8216;Data URL&#8217; function first. Tried to parse binary for a while. But couldn&#8217;t find a way to push the binary data of an image inside the image tag. Then I noticed the next function. Well, it worked like a charm. I just pushed the function&#8217;s return value to the image tag&#8217;s source attribute. Done.</p>
<p>So, to get the file path, the call should be like:</p>
<p><code>file_input_element_id.files[0].getAsDataURL()</code></p>
<p>That&#8217;s all&#8230; <img src='http://rony.creash.com.bd/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>N.B. For IE, it works OK with adding the &#8216;file://&#8217; before the value of input element. You just need to have proper permission level.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/get-image-data-using-javascript/_amp_title=Get+image+data+from+client+side+using+javascript&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/get-image-data-using-javascript/&amp;title=Get+image+data+from+client+side+using+javascript" title="Add 'Get image data from client side using javascript' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Get image data from client side using javascript' to Del.icio.us" alt="Add 'Get image data from client side using javascript' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/get-image-data-using-javascript/_amp_title=Get+image+data+from+client+side+using+javascript&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/get-image-data-using-javascript/&amp;title=Get+image+data+from+client+side+using+javascript" title="Add 'Get image data from client side using javascript' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Get image data from client side using javascript' to digg" alt="Add 'Get image data from client side using javascript' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/get-image-data-using-javascript/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/get-image-data-using-javascript/" title="Add 'Get image data from client side using javascript' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Get image data from client side using javascript' to Technorati" alt="Add 'Get image data from client side using javascript' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/get-image-data-using-javascript/_amp_title=Get+image+data+from+client+side+using+javascript&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/get-image-data-using-javascript/&amp;title=Get+image+data+from+client+side+using+javascript" title="Add 'Get image data from client side using javascript' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Get image data from client side using javascript' to Stumble Upon" alt="Add 'Get image data from client side using javascript' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/get-image-data-using-javascript/_amp_title=Get+image+data+from+client+side+using+javascript&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/get-image-data-using-javascript/&amp;title=Get+image+data+from+client+side+using+javascript" title="Add 'Get image data from client side using javascript' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Get image data from client side using javascript' to Google Bookmarks" alt="Add 'Get image data from client side using javascript' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=Get+image+data+from+client+side+using+javascript_amp_url=http_//rony.creash.com.bd/get-image-data-using-javascript/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Get+image+data+from+client+side+using+javascript&amp;url=http://rony.creash.com.bd/get-image-data-using-javascript/" title="Add 'Get image data from client side using javascript' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Get image data from client side using javascript' to SlashDot" alt="Add 'Get image data from client side using javascript' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/get-image-data-using-javascript/_amp_t=Get+image+data+from+client+side+using+javascript&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/get-image-data-using-javascript/&amp;t=Get+image+data+from+client+side+using+javascript" title="Add 'Get image data from client side using javascript' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Get image data from client side using javascript' to FaceBook" alt="Add 'Get image data from client side using javascript' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=Get+image+data+from+client+side+using+javascript_amp_c=http_//rony.creash.com.bd/get-image-data-using-javascript/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Get+image+data+from+client+side+using+javascript&amp;c=http://rony.creash.com.bd/get-image-data-using-javascript/" title="Add 'Get image data from client side using javascript' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Get image data from client side using javascript' to MySpace" alt="Add 'Get image data from client side using javascript' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/get-image-data-using-javascript/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/get-image-data-using-javascript/" title="Add 'Get image data from client side using javascript' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Get image data from client side using javascript' to Twitter" alt="Add 'Get image data from client side using javascript' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/get-image-data-using-javascript/_amp_title=Get+image+data+from+client+side+using+javascript_amp_srcURL=http_//rony.creash.com.bd/get-image-data-using-javascript/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/get-image-data-using-javascript/&amp;title=Get+image+data+from+client+side+using+javascript&amp;srcURL=http://rony.creash.com.bd/get-image-data-using-javascript/" title="Add 'Get image data from client side using javascript' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'Get image data from client side using javascript' to Google Buzz" alt="Add 'Get image data from client side using javascript' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/get-image-data-using-javascript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Advanced object selection using Mootools</title>
		<link>http://rony.creash.com.bd/advanced-object-selection-using-mootools/</link>
		<comments>http://rony.creash.com.bd/advanced-object-selection-using-mootools/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 19:30:25 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Mootools]]></category>
		<category><![CDATA[Selection]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=142</guid>
		<description><![CDATA[Mootools&#8217; &#8220;Selectors&#8221; utility has some really strong feature. It really saves a lot of time and sweat. Using this property, one can select a tag (any one can!), tag with specific name, id or any other attribute (huh!) and most amazingly part of a property value matching to some string&#8230;
Say you want to select all [...]]]></description>
			<content:encoded><![CDATA[<p>Mootools&#8217; &#8220;Selectors&#8221; utility has some really strong feature. It really saves a lot of time and sweat. Using this property, one can select a tag (any one can!), tag with specific name, id or any other attribute (huh!) and most amazingly part of a property value matching to some string&#8230;</p>
<p>Say you want to select all the div tags which has ID starting with &#8216;my&#8217;. How can you do that? <span id="more-142"></span>Select all the div in the document, parse everyone&#8217;s id? Well, here this is a one line code in Mootools using the <em>getElements</em> function. It actually uses the general RegEx symbols to match property values.</p>
<p>To select the div with id starting with &#8216;my&#8217; it would use <em>getElements(&#8216;div[id^=my]&#8216;)</em>;</p>
<p>Some other examples from Mootools documentation:</p>
<p><code>//Returns all anchors within myElement.<br />
$('myElement').getElements('a');</code></p>
<p><code>//Returns all input tags with name "dialog".<br />
$('myElement').getElements('input[name=dialog]');</code></p>
<p><code>//Returns all input tags with names ending with 'log'.<br />
$('myElement').getElements('input[name$=log]');<br />
</code><br />
<code>//Returns all email links (starting with "mailto:").<br />
$('myElement').getElements('a[href^=mailto:]');</code></p>
<p><code>//Adds events to all Elements with the class name 'email'.<br />
$(document.body).getElements('a.email').addEvents({<br />
'mouseenter': function(){<br />
this.href = 'real@email.com';<br />
},<br />
'mouseleave': function(){<br />
this.href = '#';<br />
}<br />
});</code></p>
<p>Mootools documentation on Selectors utility is here: <a href="http://mootools.net/docs/core/Utilities/Selectors" target="_blank" onclick="pageTracker._trackPageview('/outgoing/mootools.net/docs/core/Utilities/Selectors?referer=');">http://mootools.net/docs/core/Utilities/Selectors</a></p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/_amp_title=Advanced+object+selection+using+Mootools&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;title=Advanced+object+selection+using+Mootools" title="Add 'Advanced object selection using Mootools' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Advanced object selection using Mootools' to Del.icio.us" alt="Add 'Advanced object selection using Mootools' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/_amp_title=Advanced+object+selection+using+Mootools&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;title=Advanced+object+selection+using+Mootools" title="Add 'Advanced object selection using Mootools' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Advanced object selection using Mootools' to digg" alt="Add 'Advanced object selection using Mootools' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/advanced-object-selection-using-mootools/" title="Add 'Advanced object selection using Mootools' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Advanced object selection using Mootools' to Technorati" alt="Add 'Advanced object selection using Mootools' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/_amp_title=Advanced+object+selection+using+Mootools&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;title=Advanced+object+selection+using+Mootools" title="Add 'Advanced object selection using Mootools' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Advanced object selection using Mootools' to Stumble Upon" alt="Add 'Advanced object selection using Mootools' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/_amp_title=Advanced+object+selection+using+Mootools&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;title=Advanced+object+selection+using+Mootools" title="Add 'Advanced object selection using Mootools' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Advanced object selection using Mootools' to Google Bookmarks" alt="Add 'Advanced object selection using Mootools' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=Advanced+object+selection+using+Mootools_amp_url=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Advanced+object+selection+using+Mootools&amp;url=http://rony.creash.com.bd/advanced-object-selection-using-mootools/" title="Add 'Advanced object selection using Mootools' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Advanced object selection using Mootools' to SlashDot" alt="Add 'Advanced object selection using Mootools' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/_amp_t=Advanced+object+selection+using+Mootools&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;t=Advanced+object+selection+using+Mootools" title="Add 'Advanced object selection using Mootools' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Advanced object selection using Mootools' to FaceBook" alt="Add 'Advanced object selection using Mootools' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=Advanced+object+selection+using+Mootools_amp_c=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Advanced+object+selection+using+Mootools&amp;c=http://rony.creash.com.bd/advanced-object-selection-using-mootools/" title="Add 'Advanced object selection using Mootools' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Advanced object selection using Mootools' to MySpace" alt="Add 'Advanced object selection using Mootools' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/advanced-object-selection-using-mootools/" title="Add 'Advanced object selection using Mootools' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Advanced object selection using Mootools' to Twitter" alt="Add 'Advanced object selection using Mootools' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/_amp_title=Advanced+object+selection+using+Mootools_amp_srcURL=http_//rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/advanced-object-selection-using-mootools/&amp;title=Advanced+object+selection+using+Mootools&amp;srcURL=http://rony.creash.com.bd/advanced-object-selection-using-mootools/" title="Add 'Advanced object selection using Mootools' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'Advanced object selection using Mootools' to Google Buzz" alt="Add 'Advanced object selection using Mootools' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/advanced-object-selection-using-mootools/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>File upload/download on MySQL database</title>
		<link>http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/</link>
		<comments>http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 14:35:39 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Upload]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=48</guid>
		<description><![CDATA[Well&#8230; It is already a well discussed topic. But when I was first trying to find out how to do this, I really got stuck. Actully it took me a lot of time to find out the key code segment for the purpose.
So, here is what I&#8217;ve learned:
The table:
Suppose the structure of the MySQL table [...]]]></description>
			<content:encoded><![CDATA[<p>Well&#8230; It is already a well discussed topic. But when I was first trying to find out how to do this, I really got stuck. Actully it took me a lot of time to find out the key code segment for the purpose.</p>
<p>So, here is what I&#8217;ve learned:</p>
<p><strong>The table:</strong></p>
<p>Suppose the structure of the MySQL table (say &#8216;<em>file_table</em>&#8216;) is like this:</p>
<p>It has three fileds:</p>
<ul>
<li><code>id : the primary key, integer type with auto increment feature.</code></li>
<li><code>content: the content of file, blob type.</code></li>
<li><code>type: varchar type, the type of the file (e.g. doc, pdf etc.).<br />
</code></li>
</ul>
<p><strong>Upload:</strong></p>
<p>I think you can create a HTML form with a input with file type. Its pretty simple. Just use this code to make a input field be able to upload file:</p>
<p><code>&lt;input id="file_upload" name="file_upload" type="file" /&gt;</code></p>
<p>Now the backend coding. I&#8217;m using PHP for this.<span id="more-48"></span></p>
<p>You can get the temp file name (the name server assigned to your uploaded file) using this:</p>
<p><code>$tmpName = $_FILES['file_upload']['tmp_name'];</code></p>
<p>Now following code segment reads the content of the file to a variable:</p>
<p><code>$fp = fopen($tmpName, 'r');<br />
$file_size =  filesize($tmpName);<br />
$content = fread($fp, $file_size);<br />
$content = addslashes($content);<br />
fclose($fp);</code><br />
<code><br />
if(!get_magic_quotes_gpc())<br />
{<br />
$fileName = addslashes($fileName);<br />
}</code></p>
<p>To get the file type, we use this segment of code:</p>
<p><code>$type = get_file_extension($tmpName);</code></p>
<p><code>function get_file_extension($str)<br />
{<br />
$i = strrpos($str,".");<br />
if (!$i) { return ""; }<br />
$l = strlen($str) - $i;<br />
$ext = substr($str,$i+1,$l);<br />
return $ext;<br />
}</code></p>
<p>Now use this query to insert the file to database:</p>
<p><code>$query = 'INSERT INTO file_table VALUES (" ' . $content . ' ", " ' . $type . ' ")';<br />
$result = @mysql_query($query) or die(mysql_error());</code></p>
<p>That&#8217;s it. We&#8217;ve uploaded our file to the database.</p>
<p><strong>Download:</strong></p>
<p>We&#8217;ve uploaded the file. Now we need to download it sometime. Thats not that hard actually.</p>
<p>We&#8217;ll follow these stpes:</p>
<ul>
<li>Get the id of desired file</li>
<li>Fetch the file from database on the basis of the id</li>
<li>Make the file ready for download</li>
</ul>
<p>Say, we get the id from URL. Then following code will make the file available for download:</p>
<p><code>$id    = $_GET['id'];<br />
$query = "SELECT content, type FROM file_table WHERE id = '$id' ";</code></p>
<p><code>$result = mysql_query($query) or die(mysql_error());<br />
list($file, $ftype) = mysql_fetch_array($result);</code></p>
<p><code>header("Content-length: $filesize");<br />
header("Content-type: $ftype");<br />
header("Content-Disposition: attachment; filename = FILENAME.$ftype");<br />
echo $file;</code></p>
<p>Here we set the header with the file information. Make sure, nothing else is printed on the page before the <em>header()</em> call. Otherwise it will show an error and terminate. You can place your desired file name at the place of &#8216;<em>FILENAME</em>&#8216;. Another thing is, connection with the database server is to be made before any database operation. I think you know the function:</p>
<p><code>mysql_connect();</code></p>
<p>If not can check this post: <a href="http://rony.creash.com.bd/?p=42#top3" target="_blank">Basic PHP</a></p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/_amp_title=File+upload_2Fdownload+on+MySQL+database&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;title=File+upload%2Fdownload+on+MySQL+database" title="Add 'File upload/download on MySQL database' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'File upload/download on MySQL database' to Del.icio.us" alt="Add 'File upload/download on MySQL database' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/_amp_title=File+upload_2Fdownload+on+MySQL+database&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;title=File+upload%2Fdownload+on+MySQL+database" title="Add 'File upload/download on MySQL database' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'File upload/download on MySQL database' to digg" alt="Add 'File upload/download on MySQL database' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/" title="Add 'File upload/download on MySQL database' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'File upload/download on MySQL database' to Technorati" alt="Add 'File upload/download on MySQL database' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/_amp_title=File+upload_2Fdownload+on+MySQL+database&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;title=File+upload%2Fdownload+on+MySQL+database" title="Add 'File upload/download on MySQL database' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'File upload/download on MySQL database' to Stumble Upon" alt="Add 'File upload/download on MySQL database' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/_amp_title=File+upload_2Fdownload+on+MySQL+database&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;title=File+upload%2Fdownload+on+MySQL+database" title="Add 'File upload/download on MySQL database' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'File upload/download on MySQL database' to Google Bookmarks" alt="Add 'File upload/download on MySQL database' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=File+upload_2Fdownload+on+MySQL+database_amp_url=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=File+upload%2Fdownload+on+MySQL+database&amp;url=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/" title="Add 'File upload/download on MySQL database' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'File upload/download on MySQL database' to SlashDot" alt="Add 'File upload/download on MySQL database' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/_amp_t=File+upload_2Fdownload+on+MySQL+database&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;t=File+upload%2Fdownload+on+MySQL+database" title="Add 'File upload/download on MySQL database' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'File upload/download on MySQL database' to FaceBook" alt="Add 'File upload/download on MySQL database' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=File+upload_2Fdownload+on+MySQL+database_amp_c=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=File+upload%2Fdownload+on+MySQL+database&amp;c=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/" title="Add 'File upload/download on MySQL database' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'File upload/download on MySQL database' to MySpace" alt="Add 'File upload/download on MySQL database' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/" title="Add 'File upload/download on MySQL database' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'File upload/download on MySQL database' to Twitter" alt="Add 'File upload/download on MySQL database' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/_amp_title=File+upload_2Fdownload+on+MySQL+database_amp_srcURL=http_//rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/&amp;title=File+upload%2Fdownload+on+MySQL+database&amp;srcURL=http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/" title="Add 'File upload/download on MySQL database' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'File upload/download on MySQL database' to Google Buzz" alt="Add 'File upload/download on MySQL database' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/file-uploaddownload-on-mysql-database/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Monitor&#8217;s ICC Profile</title>
		<link>http://rony.creash.com.bd/monitors-icc-profile/</link>
		<comments>http://rony.creash.com.bd/monitors-icc-profile/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 01:51:34 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[ICC Profile]]></category>
		<category><![CDATA[Monitor]]></category>
		<category><![CDATA[RGB]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=45</guid>
		<description><![CDATA[Well&#8230; I&#8217;m not an expert on this section, but just solved my problem regarding this. So thought, I&#8217;d share.
I used to see the white as yellow on my Photoshop!! My monitor is Samsung SyncMaster 920NW. This problem occurred both in Windows XP and Vista!! Explored different forum but didn&#8217;t get the perfect solution. Then I [...]]]></description>
			<content:encoded><![CDATA[<p>Well&#8230; I&#8217;m not an expert on this section, but just solved my problem regarding this. So thought, I&#8217;d share.</p>
<p>I used to see the white as yellow on my Photoshop!! My monitor is Samsung SyncMaster 920NW. This problem occurred both in Windows XP and Vista!! Explored different forum but didn&#8217;t get the perfect solution. Then I started to check out different settings in my Vista control panel.</p>
<p>Here is what I&#8217;ve changed:</p>
<p>Go to Control Panel &gt; Hardware and Sound &gt; Color Management.</p>
<p>I&#8217;ve first selected the display device from combo box and then checked &#8216;Use my setting for this device&#8217;. Then removed the active ICC profile and added Adobe RGB (1998) as default profile.</p>
<p>That&#8217;s it! Well it worked for me. You are on your own risk&#8230; <img src='http://rony.creash.com.bd/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/monitors-icc-profile/_amp_title=Monitor_26_238217_3Bs+ICC+Profile&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/monitors-icc-profile/&amp;title=Monitor%26%238217%3Bs+ICC+Profile" title="Add 'Monitor&#8217;s ICC Profile' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Monitor&#8217;s ICC Profile' to Del.icio.us" alt="Add 'Monitor&#8217;s ICC Profile' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/monitors-icc-profile/_amp_title=Monitor_26_238217_3Bs+ICC+Profile&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/monitors-icc-profile/&amp;title=Monitor%26%238217%3Bs+ICC+Profile" title="Add 'Monitor&#8217;s ICC Profile' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Monitor&#8217;s ICC Profile' to digg" alt="Add 'Monitor&#8217;s ICC Profile' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/monitors-icc-profile/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/monitors-icc-profile/" title="Add 'Monitor&#8217;s ICC Profile' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Monitor&#8217;s ICC Profile' to Technorati" alt="Add 'Monitor&#8217;s ICC Profile' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/monitors-icc-profile/_amp_title=Monitor_26_238217_3Bs+ICC+Profile&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/monitors-icc-profile/&amp;title=Monitor%26%238217%3Bs+ICC+Profile" title="Add 'Monitor&#8217;s ICC Profile' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Monitor&#8217;s ICC Profile' to Stumble Upon" alt="Add 'Monitor&#8217;s ICC Profile' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/monitors-icc-profile/_amp_title=Monitor_26_238217_3Bs+ICC+Profile&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/monitors-icc-profile/&amp;title=Monitor%26%238217%3Bs+ICC+Profile" title="Add 'Monitor&#8217;s ICC Profile' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Monitor&#8217;s ICC Profile' to Google Bookmarks" alt="Add 'Monitor&#8217;s ICC Profile' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=Monitor_26_238217_3Bs+ICC+Profile_amp_url=http_//rony.creash.com.bd/monitors-icc-profile/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Monitor%26%238217%3Bs+ICC+Profile&amp;url=http://rony.creash.com.bd/monitors-icc-profile/" title="Add 'Monitor&#8217;s ICC Profile' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Monitor&#8217;s ICC Profile' to SlashDot" alt="Add 'Monitor&#8217;s ICC Profile' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/monitors-icc-profile/_amp_t=Monitor_26_238217_3Bs+ICC+Profile&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/monitors-icc-profile/&amp;t=Monitor%26%238217%3Bs+ICC+Profile" title="Add 'Monitor&#8217;s ICC Profile' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Monitor&#8217;s ICC Profile' to FaceBook" alt="Add 'Monitor&#8217;s ICC Profile' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=Monitor_26_238217_3Bs+ICC+Profile_amp_c=http_//rony.creash.com.bd/monitors-icc-profile/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Monitor%26%238217%3Bs+ICC+Profile&amp;c=http://rony.creash.com.bd/monitors-icc-profile/" title="Add 'Monitor&#8217;s ICC Profile' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Monitor&#8217;s ICC Profile' to MySpace" alt="Add 'Monitor&#8217;s ICC Profile' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/monitors-icc-profile/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/monitors-icc-profile/" title="Add 'Monitor&#8217;s ICC Profile' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Monitor&#8217;s ICC Profile' to Twitter" alt="Add 'Monitor&#8217;s ICC Profile' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/monitors-icc-profile/_amp_title=Monitor_26_238217_3Bs+ICC+Profile_amp_srcURL=http_//rony.creash.com.bd/monitors-icc-profile/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/monitors-icc-profile/&amp;title=Monitor%26%238217%3Bs+ICC+Profile&amp;srcURL=http://rony.creash.com.bd/monitors-icc-profile/" title="Add 'Monitor&#8217;s ICC Profile' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'Monitor&#8217;s ICC Profile' to Google Buzz" alt="Add 'Monitor&#8217;s ICC Profile' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/monitors-icc-profile/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Basic PHP &#8211; Part 1</title>
		<link>http://rony.creash.com.bd/basic-php-part-1/</link>
		<comments>http://rony.creash.com.bd/basic-php-part-1/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 22:21:54 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=42</guid>
		<description><![CDATA[This article is about very basic of PHP coding, creating functions and database connection using PHP. Later posts may contain detail about other features.
Target viewers are assumed as familiar with C/JAVA or other similar programming language. So I didn&#8217;t bother to clarify basic syntax.
Writing PHP code:
All your PHP content should be inside &#60;?  ?&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>This article is about very basic of PHP coding, creating functions and database connection using PHP. Later posts may contain detail about other features.</p>
<p>Target viewers are assumed as familiar with C/JAVA or other similar programming language. So I didn&#8217;t bother to clarify basic syntax.</p>
<p><strong>Writing PHP code:</strong></p>
<p>All your PHP content should be inside &lt;?  ?&gt; tags. That is the file format should be:</p>
<p><code>&lt;?<br />
Your content here.<br />
?&gt;</code></p>
<p>Most of the functions in PHP are similar to C. So if you can code in C, you can code in PHP. There are simple exceptions as:<span id="more-42"></span></p>
<p><strong>Variables:</strong><br />
PHP variables has no data type. All are same. A PHP variable starts with <strong>$</strong> sign. An example is:</p>
<p><code>$var1 = "Something";</code></p>
<p>Above variable contains a string. So you can do any string operation over it, such as, strcat, strlen etc. Have you noticed? The string functions are similar to C.</p>
<p>Now if another 3 variables are like this:</p>
<p><code>$var2 = 3;<br />
$var3 = 2;</code><br />
And<br />
<code>$var 4 = $var2 + $var3;</code></p>
<p>Now $var4 contains 5 by adding above two variables&#8217; contents.<br />
You can even do:</p>
<p><code>$var4 = $var1 + $var2;</code></p>
<p>This would provide no error, but no result either as there is a string and a number you are adding.</p>
<p><strong>Print and Handling String:</strong><br />
If you want to print something on your browser you have to write:</p>
<p><code>echo <strong>"</strong>String content what you wish to print<strong>"</strong>;<br />
echo <strong>'</strong>And something more<strong>'</strong>;</code></p>
<p>Notice that you can use either double quote (<strong>&#8220;</strong>) or single quote (<strong>&#8216;</strong>) to define a string.<br />
Now to attach a variable with a string, we use the dot (<strong>.</strong>).<br />
Example:</p>
<p><code>echo 'A number is ' <strong>.</strong> $var2 <strong>.</strong> ' and is an odd number';</code><br />
This will print:<br />
<code>A number is 3 and is an odd number</code><br />
You can also do:<br />
<code>echo $var1 . ' is a string and ' . $var2 .' is a number';</code><br />
Which will print:<br />
<code>Something is a string and 3 is a number</code></p>
<p>If you do:</p>
<p><code>$var5 = $var1 . $var2;</code></p>
<p>Then both the $var1 and $var2 will be treated as strings and $var5 will contain:</p>
<p><code>Something3</code></p>
<p><strong>Writing Functions:</strong></p>
<p>Its very easy. The syntax is:</p>
<p><code>function function_name(params)<br />
{<br />
Do something useful.<br />
return result (optional).<br />
}<br />
</code><br />
<strong>Now some DB connection:</strong></p>
<p>The My SQL database connection and manipulation is done using mysql_ functions.<br />
Such as:<br />
<code>mysql_connect();<br />
mysql_select_db();<br />
mysql_query();<br />
mysql_fetch_row();</code></p>
<p>A database connection we&#8217;ve done earlier in another project is like this:</p>
<p><code>$host= 'localhost';<br />
$user = 'root';<br />
$auth = 'password';<br />
$db = 'mydb';<br />
$msg = 'Database error occurred. Please inform the administrator.';<br />
mysql_connect($host, $user, $auth);<br />
@mysql_select_db($db) or die($msg);<br />
</code><br />
<strong>Running a Query:</strong></p>
<p>An example from previous project:</p>
<p><code>function db_select_by_id($table_name, $id)<br />
{<br />
$sql = 'SELECT * FROM '.$table_name.' WHERE '.$table_name.'_id = '.$id;<br />
$result = @mysql_query($sql);<br />
if($result)<br />
{<br />
return @mysql_fetch_object($result);<br />
}<br />
else<br />
{<br />
if($debug)<br />
{<br />
echo mysql_error();<br />
}<br />
return NULL;<br />
}<br />
}</code></p>
<p>So if we call the above function like this:<br />
<code>$result = db_select_by_id('user', 4);</code><br />
The function will run the the query:<br />
<code>SELECT * FROM user WHERE user_id = 4;</code><br />
And will return the result as object. So the $result will contain an object with the fetched row elements as object elements. We can access elements of $result as:<br />
<code>echo $result -&gt; id;<br />
echo $result -&gt; name;</code><br />
etc.<br />
Notice that, here we are fetching only one row. This is because, there should be only one row as we are searching using the primary key (id). If you need multiple rows you can use:</p>
<p><code>function db_select_all($table_name)<br />
{<br />
$sql = 'SELECT * FROM '.$table_name; $result = @mysql_query($sql);<br />
if($result)<br />
{<br />
return $result;<br />
}<br />
else<br />
{<br />
if($debug)<br />
{<br />
echo mysql_error();<br />
}<br />
return NULL;<br />
}<br />
}</code></p>
<p>Where we select all the rows from the table. Now if $result has the return value from above function, we can retrieve using following process:</p>
<p><code>while($row = @mysql_fetch_object($result))<br />
{<br />
echo $row -&gt; id;<br />
echo $row -&gt; name;<br />
}</code></p>
<p>This will fetch every row and will print them until end.<br />
Have you noticed the <strong>@</strong> sing before mysql functions? This is used so that any error message is not printed on the browser. You can remove them now to see error messages during development period.<br />
Now you can make your own functions with adding some restrictions to the query&#8230;</p>
<p>A very good resource which helps me every time is: <a onclick="pageTracker._trackPageview('/outgoing/php.net?referer=');pageTracker._trackPageview('/outgoing/php.net?referer=http://rony.creash.com.bd/?p=42');" href="http://php.net" target="_blank">http://php.net</a></p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/basic-php-part-1/_amp_title=Basic+PHP+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/basic-php-part-1/&amp;title=Basic+PHP+%26%238211%3B+Part+1" title="Add 'Basic PHP &#8211; Part 1' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Basic PHP &#8211; Part 1' to Del.icio.us" alt="Add 'Basic PHP &#8211; Part 1' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/basic-php-part-1/_amp_title=Basic+PHP+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/basic-php-part-1/&amp;title=Basic+PHP+%26%238211%3B+Part+1" title="Add 'Basic PHP &#8211; Part 1' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Basic PHP &#8211; Part 1' to digg" alt="Add 'Basic PHP &#8211; Part 1' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/basic-php-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/basic-php-part-1/" title="Add 'Basic PHP &#8211; Part 1' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Basic PHP &#8211; Part 1' to Technorati" alt="Add 'Basic PHP &#8211; Part 1' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/basic-php-part-1/_amp_title=Basic+PHP+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/basic-php-part-1/&amp;title=Basic+PHP+%26%238211%3B+Part+1" title="Add 'Basic PHP &#8211; Part 1' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Basic PHP &#8211; Part 1' to Stumble Upon" alt="Add 'Basic PHP &#8211; Part 1' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/basic-php-part-1/_amp_title=Basic+PHP+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/basic-php-part-1/&amp;title=Basic+PHP+%26%238211%3B+Part+1" title="Add 'Basic PHP &#8211; Part 1' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Basic PHP &#8211; Part 1' to Google Bookmarks" alt="Add 'Basic PHP &#8211; Part 1' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=Basic+PHP+_26_238211_3B+Part+1_amp_url=http_//rony.creash.com.bd/basic-php-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Basic+PHP+%26%238211%3B+Part+1&amp;url=http://rony.creash.com.bd/basic-php-part-1/" title="Add 'Basic PHP &#8211; Part 1' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Basic PHP &#8211; Part 1' to SlashDot" alt="Add 'Basic PHP &#8211; Part 1' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/basic-php-part-1/_amp_t=Basic+PHP+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/basic-php-part-1/&amp;t=Basic+PHP+%26%238211%3B+Part+1" title="Add 'Basic PHP &#8211; Part 1' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Basic PHP &#8211; Part 1' to FaceBook" alt="Add 'Basic PHP &#8211; Part 1' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=Basic+PHP+_26_238211_3B+Part+1_amp_c=http_//rony.creash.com.bd/basic-php-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Basic+PHP+%26%238211%3B+Part+1&amp;c=http://rony.creash.com.bd/basic-php-part-1/" title="Add 'Basic PHP &#8211; Part 1' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Basic PHP &#8211; Part 1' to MySpace" alt="Add 'Basic PHP &#8211; Part 1' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/basic-php-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/basic-php-part-1/" title="Add 'Basic PHP &#8211; Part 1' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Basic PHP &#8211; Part 1' to Twitter" alt="Add 'Basic PHP &#8211; Part 1' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/basic-php-part-1/_amp_title=Basic+PHP+_26_238211_3B+Part+1_amp_srcURL=http_//rony.creash.com.bd/basic-php-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/basic-php-part-1/&amp;title=Basic+PHP+%26%238211%3B+Part+1&amp;srcURL=http://rony.creash.com.bd/basic-php-part-1/" title="Add 'Basic PHP &#8211; Part 1' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'Basic PHP &#8211; Part 1' to Google Buzz" alt="Add 'Basic PHP &#8211; Part 1' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/basic-php-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic HTML &#8211; Part 2</title>
		<link>http://rony.creash.com.bd/basic-html-part-2/</link>
		<comments>http://rony.creash.com.bd/basic-html-part-2/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 20:38:20 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=39</guid>
		<description><![CDATA[This is the continuation of my previous post Basic HTML &#8211; Part 1. On this phase of the post, I&#8217;m going to explain the table and form tags.
Table:
Table is a very important tag and widely used for alignment management of web pages. It is defined by the &#60;table&#62; tag. Some hierarchy are needed to be [...]]]></description>
			<content:encoded><![CDATA[<p>This is the continuation of my previous post <a href="http://rony.creash.com.bd/?p=38#top3">Basic HTML &#8211; Part 1</a>. On this phase of the post, I&#8217;m going to explain the table and form tags.</p>
<p><strong>Table:</strong></p>
<p>Table is a very important tag and widely used for alignment management of web pages. It is defined by the &lt;table&gt; tag. Some hierarchy are needed to be maintained for tables. First the table, then row, then column and finally content of the column.<span id="more-39"></span></p>
<p>Example:<br />
<code><br />
&lt;table style="border:1px solid #CCCCCC;"&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Something Useful&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;</code></p>
<p>This will produce something like:</p>
<table style="border:1px solid #CCCCCC;" border="0">
<tbody>
<tr>
<td>Something Useful</td>
</tr>
</tbody>
</table>
<p>There are some other optional tags inside a table. Such as, &lt;thead&gt;, &lt;tfoot&gt; and &lt;tbody&gt;. &lt;thead&gt; is used to define the header of a table and &lt;tfoot&gt; for the footer. &lt;tbody&gt; defines the body of the table. If you want to use these tags, follow this hierarchy:<br />
<code><br />
&lt;table border="1"&gt;<br />
&lt;thead&gt;<br />
&lt;tr&gt;<br />
&lt;th&gt;Header One&lt;/th&gt;<br />
&lt;th&gt;Another Header&lt;/th&gt;<br />
&lt;/tr&gt;<br />
&lt;/thead&gt;<br />
&lt;tfoot&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Foot One&lt;/td&gt;<br />
&lt;td&gt;Foot Two&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/tfoot&gt;<br />
&lt;tbody&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Row One and Column One&lt;/td&gt;<br />
&lt;td&gt;Row One and Column Two&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td colspan="2"&gt;Row Two with Two Column Attached!&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/tbody&gt;</code></p>
<p>Which will produce something like this:</p>
<table border="1">
<thead>
<tr>
<th>Header One</th>
<th>Another Header</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Foot One</td>
<td>Foot Two</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Row One and Column One</td>
<td>Row One and Column Two</td>
</tr>
<tr>
<td colspan="2">Row Two with Two Column Attached!</td>
</tr>
</tbody>
</table>
<p>Some properties that can be attached with a table are: width, height, colspan (Span of a column. In the above code colspan=&#8221;2&#8243; defines the column will be as wide as two column), margin, padding, border etc.</p>
<p><strong>Form:</strong></p>
<p>Form is one of the most important thing in HTML. You collect any kind of data from end user through form.</p>
<p>While creating a form, you have to provide a name and an unique id for it. Also have to mention the action and method. Optionally you can attach JavaScript function on submit. Keeping the action of a form blank will submit it to the same page. The enctype of a form defines how the submitted value is passed.</p>
<p>Submitted values of a form are handled by some other scripting language like PHP, ASP etc.</p>
<p>Elements of a form are:</p>
<ul>
<li>Text Box
<ul>
<li>A single line text input area.</li>
</ul>
</li>
<li>Text Area
<ul>
<li>Multi line text input area.</li>
</ul>
</li>
<li>Combo Box
<ul>
<li>Select from a drop down list.</li>
</ul>
</li>
<li>Check Box
<ul>
<li>Check/un-check value.</li>
</ul>
</li>
<li>Radio Button
<ul>
<li>Select a value from a group.</li>
</ul>
</li>
<li>File
<ul>
<li>A file upload area.</li>
</ul>
</li>
<li>Button
<ul>
<li>Submit/reset or do some action.</li>
</ul>
</li>
<li>Label
<ul>
<li>Label of a input field.</li>
</ul>
</li>
</ul>
<p>Some points need to be notified are:</p>
<ul>
<li>You can mention width for text box.</li>
<li>You can mention width and height for text area.</li>
<li>You can distinguish between label and value of combo box. These are needed to be provided under option tag which is a child tag of select tag (used for combo box).</li>
<li>You can provide value to a check box.</li>
<li>To create a group of radio buttons provide same name/id.</li>
<li>You can provide on click JavaScript action to buttons.</li>
<li>Any form field can have functions for on change, on focus etc. JavaScript events.</li>
</ul>
<p>An example with above form elements:</p>
<p><code>&lt;form name="form1" id="form1" action="" method="post" enctype="multipart/form-data"&gt;<br />
&lt;label for="input1"&gt;Text Box&lt;/label&gt;&lt;input type="text" size="10" name="input1" id="input1" value="A Text Box" /&gt;<br />
&lt;label for="input2"&gt;Text Box&lt;/label&gt;&lt;textarea rows="2" cols="8" name="input2" id="input2"&gt;A Text Area&lt;/textarea&gt;<br />
&lt;label for="input3"&gt;Combo Box&lt;/label&gt;&lt;select name="input3" id="input3"&gt;<br />
&lt;optgroup label="Option Group"&gt;<br />
&lt;option value="1"&gt;Option 1&lt;/option&gt;<br />
&lt;option value="2"&gt;Option 2&lt;/option&gt;<br />
&lt;option value="3"&gt;Option 3&lt;/option&gt;<br />
&lt;/optgroup&gt;<br />
&lt;/select&gt;<br />
&lt;label for="input4"&gt;Check Box&lt;/label&gt;&lt;input type="checkbox" name="input4" id="input4" value="1" /&gt;<br />
&lt;label for="input5"&gt;Radio Button&lt;/label&gt;&lt;input type="radio" name="input5" id="input5" value="1" /&gt;Radio 1&lt;input type="radio" name="input5" id="input5" value="2" /&gt;Radio 2<br />
&lt;label for="input5"&gt;File&lt;/label&gt;&lt;input type="file" name="input5" id="input5" /&gt;<br />
&lt;input type="button" name="button" id="button" value="Simple Button" /&gt;&lt;input type="reset" name="reset" id="reset" value="Reset Button" /&gt;&lt;input type="submit" name="submit" id="submit" value="Submit Button" /&gt;<br />
&lt;/form&gt;</code></p>
<p>Above code will produce this:</p>
<form id="form1" enctype="multipart/form-data" method="post">
<table border="0">
<tbody>
<tr>
<td width="40%"><label for="input1">Text Box</label></td>
<td>
<input id="input1" style="font-size:11px; font-family:Arial; color:#666666;" name="input1" size="10" type="text" value="A Text Box" /></td>
</tr>
<tr>
<td><label for="input2">Text Box</label></td>
<td><textarea id="input2" style="font-size:11px; font-family:Arial; color:#666666;" cols="8" rows="2" name="input2">A Text Area</textarea></td>
</tr>
<tr>
<td><label for="input3">Combo Box</label></td>
<td>
<select id="input3" style="font-size:11px; font-family:Arial; color:#666666;" name="input3"> <optgroup label="Option Group"></optgroup> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> </select>
</td>
</tr>
<tr>
<td><label for="input4">Check Box</label></td>
<td>
<input id="input4" name="input4" type="checkbox" value="1" /></td>
</tr>
<tr>
<td><label for="input5">Radio Group</label></td>
<td>
<input id="input5" name="input5" type="radio" value="1" />Radio 1</p>
<input id="input5" name="input5" type="radio" value="2" />Radio 2</td>
</tr>
<tr>
<td><label for="input5">File</label></td>
<td>
<input id="input5" style="font-size:11px; font-family:Arial; color:#666666;" name="input5" type="file" /></td>
</tr>
<tr>
<td colspan="2">
<input id="button" style="font-size:11px; font-family:Arial; color:#666666;" name="button" type="button" value="Simple Button" />
<input id="reset" style="font-size:11px; font-family:Arial; color:#666666;" name="reset" type="reset" value="Reset Button" />
<input id="submit" style="font-size:11px; font-family:Arial; color:#666666;" name="submit" type="submit" value="Submit Button" /></td>
</tr>
</tbody>
</table>
</form>
<p>You can provide on submit, on focus, on blur, on change etc. event handler using JavaScript or VB Script if you wish.</p>
<p>Going to finish this part here.</p>
<p>Take care.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/basic-html-part-2/_amp_title=Basic+HTML+_26_238211_3B+Part+2&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/basic-html-part-2/&amp;title=Basic+HTML+%26%238211%3B+Part+2" title="Add 'Basic HTML &#8211; Part 2' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Basic HTML &#8211; Part 2' to Del.icio.us" alt="Add 'Basic HTML &#8211; Part 2' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/basic-html-part-2/_amp_title=Basic+HTML+_26_238211_3B+Part+2&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/basic-html-part-2/&amp;title=Basic+HTML+%26%238211%3B+Part+2" title="Add 'Basic HTML &#8211; Part 2' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Basic HTML &#8211; Part 2' to digg" alt="Add 'Basic HTML &#8211; Part 2' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/basic-html-part-2/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/basic-html-part-2/" title="Add 'Basic HTML &#8211; Part 2' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Basic HTML &#8211; Part 2' to Technorati" alt="Add 'Basic HTML &#8211; Part 2' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/basic-html-part-2/_amp_title=Basic+HTML+_26_238211_3B+Part+2&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/basic-html-part-2/&amp;title=Basic+HTML+%26%238211%3B+Part+2" title="Add 'Basic HTML &#8211; Part 2' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Basic HTML &#8211; Part 2' to Stumble Upon" alt="Add 'Basic HTML &#8211; Part 2' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/basic-html-part-2/_amp_title=Basic+HTML+_26_238211_3B+Part+2&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/basic-html-part-2/&amp;title=Basic+HTML+%26%238211%3B+Part+2" title="Add 'Basic HTML &#8211; Part 2' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Basic HTML &#8211; Part 2' to Google Bookmarks" alt="Add 'Basic HTML &#8211; Part 2' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=Basic+HTML+_26_238211_3B+Part+2_amp_url=http_//rony.creash.com.bd/basic-html-part-2/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Basic+HTML+%26%238211%3B+Part+2&amp;url=http://rony.creash.com.bd/basic-html-part-2/" title="Add 'Basic HTML &#8211; Part 2' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Basic HTML &#8211; Part 2' to SlashDot" alt="Add 'Basic HTML &#8211; Part 2' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/basic-html-part-2/_amp_t=Basic+HTML+_26_238211_3B+Part+2&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/basic-html-part-2/&amp;t=Basic+HTML+%26%238211%3B+Part+2" title="Add 'Basic HTML &#8211; Part 2' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Basic HTML &#8211; Part 2' to FaceBook" alt="Add 'Basic HTML &#8211; Part 2' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=Basic+HTML+_26_238211_3B+Part+2_amp_c=http_//rony.creash.com.bd/basic-html-part-2/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Basic+HTML+%26%238211%3B+Part+2&amp;c=http://rony.creash.com.bd/basic-html-part-2/" title="Add 'Basic HTML &#8211; Part 2' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Basic HTML &#8211; Part 2' to MySpace" alt="Add 'Basic HTML &#8211; Part 2' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/basic-html-part-2/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/basic-html-part-2/" title="Add 'Basic HTML &#8211; Part 2' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Basic HTML &#8211; Part 2' to Twitter" alt="Add 'Basic HTML &#8211; Part 2' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/basic-html-part-2/_amp_title=Basic+HTML+_26_238211_3B+Part+2_amp_srcURL=http_//rony.creash.com.bd/basic-html-part-2/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/basic-html-part-2/&amp;title=Basic+HTML+%26%238211%3B+Part+2&amp;srcURL=http://rony.creash.com.bd/basic-html-part-2/" title="Add 'Basic HTML &#8211; Part 2' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'Basic HTML &#8211; Part 2' to Google Buzz" alt="Add 'Basic HTML &#8211; Part 2' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/basic-html-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic HTML &#8211; Part 1</title>
		<link>http://rony.creash.com.bd/basic-html-part-1/</link>
		<comments>http://rony.creash.com.bd/basic-html-part-1/#comments</comments>
		<pubDate>Sat, 31 May 2008 08:31:00 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=38</guid>
		<description><![CDATA[Well.. I was supposed to take a short class for my developer group in a recent project. I thought I&#8217;d rather post the topics and some detail of that class here, which can help beginners.
First of all, we are going to learn some keywords and their use:

HTML &#8211; Hyper Text Markup Language.

Used to write web [...]]]></description>
			<content:encoded><![CDATA[<p>Well.. I was supposed to take a short class for my developer group in a recent project. I thought I&#8217;d rather post the topics and some detail of that class here, which can help beginners.</p>
<p>First of all, we are going to learn some keywords and their use:</p>
<ul>
<li>HTML &#8211; Hyper Text Markup Language.
<ul>
<li>Used to write web pages. Browsers understand this language. You have to talk with web browsers in this language.</li>
</ul>
</li>
<li>Tags
<ul>
<li>Tags are used to distinguish different elements in a web page. As an example, we&#8217;d use the anchor tag (&lt;a&gt;) to define anchor or links.</li>
</ul>
</li>
<li>CSS &#8211; Cascading Style Sheet
<ul>
<li>CSS is used to define style for a web page. We&#8217;d learn about CSS in a later session.</li>
</ul>
</li>
<li>Scripts
<ul>
<li>Scripts are some programming language which helps to interact a web page with user and server. PHP, JavaScript etc. are commonly used scripts in web development.</li>
</ul>
</li>
</ul>
<p>Now I&#8217;m going to explain some rapidly used tags here.<span id="more-38"></span></p>
<p><strong>Anchor:</strong></p>
<p>Anchor tag is very important. We use this to link some other page or website using this tag. Attributes of anchor tags are: &#8216;href&#8217;, &#8216;title&#8217;, &#8216;onClick&#8217; etc. href defines the target of the anchor; title has the definition of the link and onClick is used to define some JavaScript click action for that link.</p>
<p>Example:</p>
<p><code>&lt;a href="http://www.creash.com.bd/" title="Creash Website" onClick="javascript:alert('Creash Clicked!')"&gt;Creash&lt;/a&gt;</code></p>
<p>Above code provides following output:</p>
<p><code><a title="Creash Website" onclick="pageTracker._trackPageview('/outgoing/www.creash.com.bd/?referer=');pageTracker._trackPageview('/outgoing/www.creash.com.bd/?referer=http://rony.creash.com.bd/wp-admin/edit.php?post_status=draft');pageTracker._trackPageview('/outgoing/www.creash.com.bd/?referer=http://rony.creash.com.bd/wp-admin/edit.php?post_status=draft');pageTracker._trackPageview('/outgoing/www.creash.com.bd/?referer=');javascript:alert('Creash Clicked!')" href="http://www.creash.com.bd/">Creash</a></code></p>
<p><strong>Paragraph:</strong></p>
<p>Its an important tag. Texts in an web page are placed inside paragraphs. This makes it easy to manipulate and stylize.</p>
<p>Example:</p>
<p><code>&lt;p style="border:1px solid #CCCCCC; margin: 3px;&gt;Loream ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque quis dui. Aenean nec odio sit amet nisi faucibus euismod.&lt;/p&gt;</code></p>
<p>Above code will provide following output:</p>
<p style="border: 1px none;">Loream ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque quis dui. Aenean nec odio sit amet nisi faucibus euismod.</p>
<p style="border: 1px none;"><strong>Div:</strong></p>
<p style="border: 1px none;">This is another most important tag. This tag is used to divide your web page in different parts. You can specify styles to a div tag; provide id and manipulate it using JavaScript. General attributes of a div tag are: &#8216;id&#8217;, &#8216;position&#8217;, &#8216;float&#8217; etc. You can place a div any where of your website.</p>
<p style="border: 1px none;">Example:</p>
<p><code>&lt;div id="example1" style="position: relative; width:100%; height:50px; float:right; background: #CCCCCC; color:#000000; border: 1px dashed #FFFFFF; font-size: 15px; display: block; clear: both; margin-bottom: 15px;"&gt;This is an example div tag with some popular styling&lt;/div&gt;</code></p>
<p style="border: 1px none;">Above code will produce following output:</p>
<p style="border: 1px none;">
<p style="border: 1px none;">
<div id="example1" style="border: 1px dashed #ffffff; background: #cccccc none repeat scroll 0% 0%; position: relative; width: 100%; height: 50px; float: right; color: #000000; font-size: 15px; display: block; clear: both; margin-bottom: 15px;">This is an example div tag with some popular styling</div>
<p style="border: 1px none;">Now you can access the above div with its id &#8216;example1&#8242; and add any action.</p>
<p><strong>Span:</strong></p>
<p>The last topic of this session. This tag is used to differentiate a small part inside another part. Suppose a block of text inside a large div.</p>
<p>Example:</p>
<p><code>&lt;div&gt;Hello there! &lt;span style="font-weight:bold"&gt;This text is inside span!&lt;/span&gt; You are watching an use of span tag.&lt;/div&gt;</code></p>
<p>Will produce:</p>
<div>Hello there! <span style="font-weight:bold">This text is inside span!</span> You are watching an use of span tag.</div>
<p style="border: 1px none;">Hope thats enough babbling  for today. I&#8217;ll produce some more on next session <img src='http://rony.creash.com.bd/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p style="border: 1px none;">Learn more HTML and other web programming from this amazing website: <a title="W3Schools" href="http://www.w3schools.com/" onclick="pageTracker._trackPageview('/outgoing/www.w3schools.com/?referer=');">W3Schools</a></p>
<p style="border: 1px none;">Take care&#8230;. <img src='http://rony.creash.com.bd/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/basic-html-part-1/_amp_title=Basic+HTML+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/basic-html-part-1/&amp;title=Basic+HTML+%26%238211%3B+Part+1" title="Add 'Basic HTML &#8211; Part 1' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Basic HTML &#8211; Part 1' to Del.icio.us" alt="Add 'Basic HTML &#8211; Part 1' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/basic-html-part-1/_amp_title=Basic+HTML+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/basic-html-part-1/&amp;title=Basic+HTML+%26%238211%3B+Part+1" title="Add 'Basic HTML &#8211; Part 1' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Basic HTML &#8211; Part 1' to digg" alt="Add 'Basic HTML &#8211; Part 1' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/basic-html-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/basic-html-part-1/" title="Add 'Basic HTML &#8211; Part 1' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'Basic HTML &#8211; Part 1' to Technorati" alt="Add 'Basic HTML &#8211; Part 1' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/basic-html-part-1/_amp_title=Basic+HTML+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/basic-html-part-1/&amp;title=Basic+HTML+%26%238211%3B+Part+1" title="Add 'Basic HTML &#8211; Part 1' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Basic HTML &#8211; Part 1' to Stumble Upon" alt="Add 'Basic HTML &#8211; Part 1' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/basic-html-part-1/_amp_title=Basic+HTML+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/basic-html-part-1/&amp;title=Basic+HTML+%26%238211%3B+Part+1" title="Add 'Basic HTML &#8211; Part 1' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Basic HTML &#8211; Part 1' to Google Bookmarks" alt="Add 'Basic HTML &#8211; Part 1' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=Basic+HTML+_26_238211_3B+Part+1_amp_url=http_//rony.creash.com.bd/basic-html-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Basic+HTML+%26%238211%3B+Part+1&amp;url=http://rony.creash.com.bd/basic-html-part-1/" title="Add 'Basic HTML &#8211; Part 1' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'Basic HTML &#8211; Part 1' to SlashDot" alt="Add 'Basic HTML &#8211; Part 1' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/basic-html-part-1/_amp_t=Basic+HTML+_26_238211_3B+Part+1&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/basic-html-part-1/&amp;t=Basic+HTML+%26%238211%3B+Part+1" title="Add 'Basic HTML &#8211; Part 1' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Basic HTML &#8211; Part 1' to FaceBook" alt="Add 'Basic HTML &#8211; Part 1' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=Basic+HTML+_26_238211_3B+Part+1_amp_c=http_//rony.creash.com.bd/basic-html-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Basic+HTML+%26%238211%3B+Part+1&amp;c=http://rony.creash.com.bd/basic-html-part-1/" title="Add 'Basic HTML &#8211; Part 1' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Basic HTML &#8211; Part 1' to MySpace" alt="Add 'Basic HTML &#8211; Part 1' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/basic-html-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/basic-html-part-1/" title="Add 'Basic HTML &#8211; Part 1' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Basic HTML &#8211; Part 1' to Twitter" alt="Add 'Basic HTML &#8211; Part 1' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/basic-html-part-1/_amp_title=Basic+HTML+_26_238211_3B+Part+1_amp_srcURL=http_//rony.creash.com.bd/basic-html-part-1/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/basic-html-part-1/&amp;title=Basic+HTML+%26%238211%3B+Part+1&amp;srcURL=http://rony.creash.com.bd/basic-html-part-1/" title="Add 'Basic HTML &#8211; Part 1' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'Basic HTML &#8211; Part 1' to Google Buzz" alt="Add 'Basic HTML &#8211; Part 1' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/basic-html-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SEO &#8211; Whats the big deal?</title>
		<link>http://rony.creash.com.bd/seo-whats-the-big-deal/</link>
		<comments>http://rony.creash.com.bd/seo-whats-the-big-deal/#comments</comments>
		<pubDate>Tue, 06 May 2008 20:49:06 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://rony.creash.com.bd/?p=32</guid>
		<description><![CDATA[SEO, or Search Engine Optimization, became a buzz word since few years. It became headache of the webmasters. &#8220;Is my website properly optimized for search engines?&#8221; &#8220;How can I index my site to popular search engines?&#8221; Some tries to use the &#8216;Black Hat&#8217; way (don&#8217;t know how successful those approaches are)!!
I thought, as there is [...]]]></description>
			<content:encoded><![CDATA[<p>SEO, or Search Engine Optimization, became a buzz word since few years. It became headache of the webmasters. &#8220;Is my website properly optimized for search engines?&#8221; &#8220;How can I index my site to popular search engines?&#8221; Some tries to use the &#8216;Black Hat&#8217; way (don&#8217;t know how successful those approaches are)!!</p>
<p>I thought, as there is nothing to do right now, I may give some advice for free about this.</p>
<p>SEO means optimizing your website properly, so that popular search engines index your important pages. Its important because you have to catch the market. If people can&#8217;t find you out through search engines, how would they reach you?</p>
<p>OK, how to optimize your site? Its not that hard. You code your pages properly and keep your contents organized. Manage search bots using robots.txt and reffer/block from indexing some directories.<span id="more-32"></span></p>
<p>Some important things you have to do to reach to the top of search results is:</p>
<ul>
<li>Build the site for public, not for robots.</li>
<li>Follow web standards. Test your HTML, CSS etc. from <a href="http://validator.w3.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/validator.w3.org/?referer=');">W3.ORG</a></li>
<li>Provide unique contents to your web pages.</li>
<li>Avoid invalid and hidden links.</li>
<li>Avoid referral links which loop back to you.</li>
<li>Use proper title, meta keywords and descriptions (though the importance of these is going down now a days).</li>
<li>Don&#8217;t use irrelevant keywords/descriptions in meta tag.</li>
<li>Avoid broken links.</li>
<li>Avoid duplicate contents.</li>
<li>Don&#8217;t make a page too huge.</li>
<li>Use a sitemap and refer robots to that.</li>
<li>Use alt and title for links and images.</li>
</ul>
<p>Well, those are just some suggestions. You may build a much better website with your own creativity. You are not bound to follow those rules. You have the freedom to create your own rule. If that hits, we all will follow you!!</p>
<p>Number of hits to your web always is a important factor. This also motivates search engines. To increase your hits, add some <a title="Digg" onclick="pageTracker._trackPageview('/outgoing/digg.com?referer=');pageTracker._trackPageview('/outgoing/digg.com?referer=');" href="http://digg.com" target="_blank">Digg</a>, <a onclick="pageTracker._trackPageview('/outgoing/del.icio.us?referer=');pageTracker._trackPageview('/outgoing/del.icio.us?referer=');" href="http://del.icio.us" target="_blank">Delicious</a>, <a onclick="pageTracker._trackPageview('/outgoing/stumbleupon.com?referer=');pageTracker._trackPageview('/outgoing/stumbleupon.com?referer=');" href="http://stumbleupon.com" target="_blank">Stumbleupon</a> links on your page. Submit your sites to the web galleries. Some web galleries:</p>
<ul>
<li><a href="http://bestwebgallery.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/bestwebgallery.com/?referer=');">bestwebgallery.com</a></li>
<li><a href="http://www.brdcast.net/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.brdcast.net/?referer=');">brdcast.net</a></li>
<li><a href="http://www.coolsitecollection.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.coolsitecollection.com/?referer=');">coolsitecollection.com</a></li>
<li><a href="http://css-warfare.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/css-warfare.com/?referer=');">css-warfare.com</a></li>
<li>There are a lot many. Visit <a href="http://stylizedweb.com/2008/01/18/all-those-web-galleries/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/stylizedweb.com/2008/01/18/all-those-web-galleries/?referer=');">here</a> for a larger list.</li>
</ul>
<p>Care to see the <a onclick="pageTracker._trackPageview('/outgoing/www.alexa.com?referer=');pageTracker._trackPageview('/outgoing/www.alexa.com?referer=');" href="http://www.alexa.com" target="_blank">alexa</a> rating of your site some times.</p>
<p>You may visit your site using <a onclick="pageTracker._trackPageview('/outgoing/lynx.browser.org?referer=');pageTracker._trackPageview('/outgoing/lynx.browser.org?referer=');" href="http://lynx.browser.org" target="_blank">Lynx</a> sometime to see how it looks to search robots.</p>
<p>As the final note, you have the options to use &#8216;Black Hat&#8217;(!) ways to cheat search bots. I&#8217;m not going to explain those here. You may find references on the web. But my suggestion is not to use those. May be you got lucky for once, but if you are caught or blacklisted, your site may be dropped under thousands or even millions.</p>
<p>Some references to popular search engines&#8217; guidelines:</p>
<ul>
<li><a onclick="pageTracker._trackPageview('/outgoing/search.msn.com.sg/docs/siteowner.aspx?t=SEARCH_WEBMASTER_REF_GuidelinesforOptimizingSite.htm&amp;referer=');pageTracker._trackPageview('/outgoing/search.msn.com.sg/docs/siteowner.aspx?t=SEARCH_WEBMASTER_REF_GuidelinesforOptimizingSite.htm&amp;referer=');" href="http://search.msn.com.sg/docs/siteowner.aspx?t=SEARCH_WEBMASTER_REF_GuidelinesforOptimizingSite.htm" target="_blank">MSN</a></li>
<li><a onclick="pageTracker._trackPageview('/outgoing/help.yahoo.com/l/us/yahoo/search/basics/basics-18.html?referer=');pageTracker._trackPageview('/outgoing/help.yahoo.com/l/us/yahoo/search/basics/basics-18.html?referer=');" href="http://help.yahoo.com/l/us/yahoo/search/basics/basics-18.html" target="_blank">Yahoo!</a></li>
<li><a onclick="pageTracker._trackPageview('/outgoing/www.google.com/support/webmasters/bin/answer.py?hl=en_amp_answer=35769&amp;referer=');pageTracker._trackPageview('/outgoing/www.google.com/support/webmasters/bin/answer.py?hl=en_amp_answer=35769&amp;referer=');" href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=35769" target="_blank">Google</a></li>
</ul>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark:</em><br /><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/del.icio.us/post?url=http_//rony.creash.com.bd/seo-whats-the-big-deal/_amp_title=SEO+_26_238211_3B+Whats+the+big+deal_3F&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://rony.creash.com.bd/seo-whats-the-big-deal/&amp;title=SEO+%26%238211%3B+Whats+the+big+deal%3F" title="Add 'SEO &#8211; Whats the big deal?' to Del.icio.us"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'SEO &#8211; Whats the big deal?' to Del.icio.us" alt="Add 'SEO &#8211; Whats the big deal?' to Del.icio.us" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/digg.com/submit?phase=2_amp_url=http_//rony.creash.com.bd/seo-whats-the-big-deal/_amp_title=SEO+_26_238211_3B+Whats+the+big+deal_3F&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://rony.creash.com.bd/seo-whats-the-big-deal/&amp;title=SEO+%26%238211%3B+Whats+the+big+deal%3F" title="Add 'SEO &#8211; Whats the big deal?' to digg"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'SEO &#8211; Whats the big deal?' to digg" alt="Add 'SEO &#8211; Whats the big deal?' to digg" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.technorati.com/faves?add=http_//rony.creash.com.bd/seo-whats-the-big-deal/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://rony.creash.com.bd/seo-whats-the-big-deal/" title="Add 'SEO &#8211; Whats the big deal?' to Technorati"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'SEO &#8211; Whats the big deal?' to Technorati" alt="Add 'SEO &#8211; Whats the big deal?' to Technorati" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.stumbleupon.com/submit?url=http_//rony.creash.com.bd/seo-whats-the-big-deal/_amp_title=SEO+_26_238211_3B+Whats+the+big+deal_3F&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://rony.creash.com.bd/seo-whats-the-big-deal/&amp;title=SEO+%26%238211%3B+Whats+the+big+deal%3F" title="Add 'SEO &#8211; Whats the big deal?' to Stumble Upon"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'SEO &#8211; Whats the big deal?' to Stumble Upon" alt="Add 'SEO &#8211; Whats the big deal?' to Stumble Upon" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/bookmarks/mark?op=edit_amp_output=popup_amp_bkmk=http_//rony.creash.com.bd/seo-whats-the-big-deal/_amp_title=SEO+_26_238211_3B+Whats+the+big+deal_3F&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://rony.creash.com.bd/seo-whats-the-big-deal/&amp;title=SEO+%26%238211%3B+Whats+the+big+deal%3F" title="Add 'SEO &#8211; Whats the big deal?' to Google Bookmarks"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'SEO &#8211; Whats the big deal?' to Google Bookmarks" alt="Add 'SEO &#8211; Whats the big deal?' to Google Bookmarks" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/slashdot.org/bookmark.pl?title=SEO+_26_238211_3B+Whats+the+big+deal_3F_amp_url=http_//rony.creash.com.bd/seo-whats-the-big-deal/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=SEO+%26%238211%3B+Whats+the+big+deal%3F&amp;url=http://rony.creash.com.bd/seo-whats-the-big-deal/" title="Add 'SEO &#8211; Whats the big deal?' to SlashDot"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'SEO &#8211; Whats the big deal?' to SlashDot" alt="Add 'SEO &#8211; Whats the big deal?' to SlashDot" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/share.php?u=http_//rony.creash.com.bd/seo-whats-the-big-deal/_amp_t=SEO+_26_238211_3B+Whats+the+big+deal_3F&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://rony.creash.com.bd/seo-whats-the-big-deal/&amp;t=SEO+%26%238211%3B+Whats+the+big+deal%3F" title="Add 'SEO &#8211; Whats the big deal?' to FaceBook"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'SEO &#8211; Whats the big deal?' to FaceBook" alt="Add 'SEO &#8211; Whats the big deal?' to FaceBook" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.myspace.com/Modules/PostTo/Pages/?t=SEO+_26_238211_3B+Whats+the+big+deal_3F_amp_c=http_//rony.creash.com.bd/seo-whats-the-big-deal/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=SEO+%26%238211%3B+Whats+the+big+deal%3F&amp;c=http://rony.creash.com.bd/seo-whats-the-big-deal/" title="Add 'SEO &#8211; Whats the big deal?' to MySpace"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'SEO &#8211; Whats the big deal?' to MySpace" alt="Add 'SEO &#8211; Whats the big deal?' to MySpace" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/twitter.com/home?status=http_//rony.creash.com.bd/seo-whats-the-big-deal/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://rony.creash.com.bd/seo-whats-the-big-deal/" title="Add 'SEO &#8211; Whats the big deal?' to Twitter"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'SEO &#8211; Whats the big deal?' to Twitter" alt="Add 'SEO &#8211; Whats the big deal?' to Twitter" /></a><a class="social_img" onclick="pageTracker._trackPageview('/outgoing/www.google.com/reader/link?url=http_//rony.creash.com.bd/seo-whats-the-big-deal/_amp_title=SEO+_26_238211_3B+Whats+the+big+deal_3F_amp_srcURL=http_//rony.creash.com.bd/seo-whats-the-big-deal/&amp;referer=');window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/reader/link?url=http://rony.creash.com.bd/seo-whats-the-big-deal/&amp;title=SEO+%26%238211%3B+Whats+the+big+deal%3F&amp;srcURL=http://rony.creash.com.bd/seo-whats-the-big-deal/" title="Add 'SEO &#8211; Whats the big deal?' to Google Buzz"><img src="http://rony.creash.com.bd/wp-content/plugins/social-bookmarking-reloaded/googlebuzz.png" title="Add 'SEO &#8211; Whats the big deal?' to Google Buzz" alt="Add 'SEO &#8211; Whats the big deal?' to Google Buzz" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://rony.creash.com.bd/seo-whats-the-big-deal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
