<?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>Vinodkram &#187; web development</title>
	<atom:link href="http://www.vinodkram.com/category/web-development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vinodkram.com</link>
	<description>Creative, Informative and Entertaining Stuff for everyone</description>
	<lastBuildDate>Mon, 26 Dec 2011 18:34:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>configure database using propel</title>
		<link>http://www.vinodkram.com/configure-database-using-propel</link>
		<comments>http://www.vinodkram.com/configure-database-using-propel#comments</comments>
		<pubDate>Mon, 26 Dec 2011 18:34:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MVC]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=1614</guid>
		<description><![CDATA[$ ./symfony configure:database --name=propel --class=sfPropelDatabase "mysql:host=localhost;dbname=dbname" username userpassword]]></description>
			<content:encoded><![CDATA[<pre><code>$ ./symfony configure:database --name=propel --class=sfPropelDatabase "mysql:host=localhost;dbname=dbname" username userpassword</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/configure-database-using-propel/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get the allowed option list in drupal theme template or view file</title>
		<link>http://www.vinodkram.com/how-to-get-the-allowed-option-list-in-drupal-theme-template-or-view-file</link>
		<comments>http://www.vinodkram.com/how-to-get-the-allowed-option-list-in-drupal-theme-template-or-view-file#comments</comments>
		<pubDate>Thu, 15 Dec 2011 09:45:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=1609</guid>
		<description><![CDATA[If you want to get the option list of the content type that you have created , then you can get the list as follows: $content_field = content_fields(&#8216;whatever_the_field_name_is&#8217;); $allowed_values = content_allowed_values($content_field); So the $allowed_values will give you the array of the option list with the key value association. Note: The &#8220;whatever_the_field_name_is&#8221; is the field name [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to get the option list of the content type that you have created , then you can get the list as follows:</p>
<p>$content_field = content_fields(&#8216;whatever_the_field_name_is&#8217;);<br />
$allowed_values = content_allowed_values($content_field);</p>
<p>So the $allowed_values will give you the array of the option list with the key value association.</p>
<p><strong>Note:</strong> The &#8220;whatever_the_field_name_is&#8221; is the field name that you had specified while adding the field, you can get the field name from your content type .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-get-the-allowed-option-list-in-drupal-theme-template-or-view-file/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to add select option in drupal while creating content type</title>
		<link>http://www.vinodkram.com/how-to-add-select-option-in-drupal-while-creating-content-type</link>
		<comments>http://www.vinodkram.com/how-to-add-select-option-in-drupal-while-creating-content-type#comments</comments>
		<pubDate>Thu, 15 Dec 2011 09:39:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=1607</guid>
		<description><![CDATA[Whenever you create any content type in drupal ( version 6 and above) and you required a filed of type select list, then you can provide the allowed values of the select option in two ways CASE 1 : option 1 option 2 option 3 CASE 2 : 1&#124;option 1 2&#124;option 2 3&#124;option 3 Each [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever you create any content type in drupal ( version 6 and above) and you required a filed of type select list, then you can provide the allowed values of the select option in two ways</p>
<p><strong>CASE 1 :</strong></p>
<p>option 1<br />
option 2<br />
option 3</p>
<p><strong>CASE 2 : </strong></p>
<p>1|option 1<br />
2|option 2<br />
3|option 3</p>
<p>Each new option has to be entered on a new line<br />
So enternally the select list generated would be as follows<br />
<strong>In case 1 : </strong></p>
<p>&lt;select&gt;<br />
&lt;option value=&#8221;option 1&#8243;&gt;option 1&lt;/option&gt;<br />
&lt;option value=&#8221;option 2&#8243;&gt;option 2&lt;/option&gt;<br />
&lt;option value=&#8221;option 3&#8243;&gt;option 3&lt;/option&gt;<br />
&lt;/select&gt;</p>
<p><strong>In case 2 : </strong></p>
<p>&lt;select&gt;<br />
&lt;option value=&#8221;1&#8243;&gt;option 1&lt;/option&gt;<br />
&lt;option value=&#8221;2&#8243;&gt;option 2&lt;/option&gt;<br />
&lt;option value=&#8221;3&#8243;&gt;option 3&lt;/option&gt;<br />
&lt;/select&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-add-select-option-in-drupal-while-creating-content-type/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace multiple space with single space in PHP</title>
		<link>http://www.vinodkram.com/replace-multiple-space-with-single-space-in-php</link>
		<comments>http://www.vinodkram.com/replace-multiple-space-with-single-space-in-php#comments</comments>
		<pubDate>Wed, 14 Dec 2011 06:40:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=1604</guid>
		<description><![CDATA[If you want to replace multiple space with single space from a string you can use preg_replace function for this. Refer the below example preg_replace(&#8220;!\s+!&#8221;,&#8221; &#8220;,$yourstring); For example $yourstring = &#8220;This contain space&#8221;; $modifiedString = preg_replace(&#8220;!\s+!&#8221;,&#8221; &#8220;,$yourstring); echo $modifiedString; // This contain space // output]]></description>
			<content:encoded><![CDATA[<p>If you want to replace multiple space with single space from a string you can use <a href="http://in.php.net/manual/en/function.preg-replace.php" target="_blank">preg_replace</a> function for this. Refer the below example</p>
<p>preg_replace(&#8220;!\s+!&#8221;,&#8221; &#8220;,$yourstring);</p>
<p>For example<br />
$yourstring = &#8220;This contain     space&#8221;;<br />
$modifiedString = preg_replace(&#8220;!\s+!&#8221;,&#8221; &#8220;,$yourstring);<br />
echo $modifiedString;<br />
//  This contain space // output</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/replace-multiple-space-with-single-space-in-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get symfony project base url in template file</title>
		<link>http://www.vinodkram.com/how-to-get-symfony-project-base-url-in-template-file</link>
		<comments>http://www.vinodkram.com/how-to-get-symfony-project-base-url-in-template-file#comments</comments>
		<pubDate>Sat, 03 Dec 2011 11:17:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=1595</guid>
		<description><![CDATA[To get the base url of your symfony project , you can use the below in your template file. $sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot() And to get your current app URL. $sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot().$sf_request->getPathInfoPrefix();]]></description>
			<content:encoded><![CDATA[<p>To get the base url of your symfony project , you can use the below in your template file.</p>
<p>$sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot()</p>
<p>And to get your current app URL.</p>
<p>$sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot().$sf_request->getPathInfoPrefix();</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-get-symfony-project-base-url-in-template-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to check PHP error before including any file in your script</title>
		<link>http://www.vinodkram.com/how-to-check-php-error-before-including-any-file-in-your-script</link>
		<comments>http://www.vinodkram.com/how-to-check-php-error-before-including-any-file-in-your-script#comments</comments>
		<pubDate>Wed, 23 Feb 2011 05:42:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.vinodkram.com/?p=1565</guid>
		<description><![CDATA[Suppose you want to include/require any file in your scripts, But before doing so you want to confirm that the included or required file doesn&#8217;t contain error. Then in that case you can use the below code to do the same. /* Implementation */]]></description>
			<content:encoded><![CDATA[<p>Suppose you want to include/require any file in your scripts, But before doing so you want to confirm that the included or required file doesn&#8217;t contain error. Then in that case you can use the below code to do the same.</p>
<p>/* Implementation */</p>
<p><?php</p>
<p>$filePath = "the physical loaction of the file";<br />
if(chechFileSyntax($filePath))<br />
{<br />
	include($filePath); // OR require($filePath);<br />
}<br />
else<br />
{</p>
<p>	echo "The included file contain error";<br />
}</p>
<p>function chechFileSyntax($fileName)<br />
{</p>
<p>	if(file_exists($fileName) &#038;&#038; is_readable($fileName))<br />
	{<br />
		$checkSyntax = shell_exec('php -l '.$fileName);<br />
		if(preg_match("/No/",$checkSyntax))<br />
		{<br />
			return true; // No error<br />
		}<br />
		else<br />
		{<br />
			return false; // Contain Error<br />
		}<br />
	}<br />
}<br />
?></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/how-to-check-php-error-before-including-any-file-in-your-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>integrate window media player in your website</title>
		<link>http://www.vinodkram.com/integrate-window-media-player-in-your-website</link>
		<comments>http://www.vinodkram.com/integrate-window-media-player-in-your-website#comments</comments>
		<pubDate>Wed, 04 Feb 2009 10:31:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://vinodkram.wordpress.com/2009/02/04/integrate-window-media-player-in-your-website/</guid>
		<description><![CDATA[&#60;html&#62; &#60;head&#62;&#60;/head&#62; &#60;body leftmargin=&#8221;0&#8243; topmargin=&#8221;0&#8243;&#62; &#60;table cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243; border=&#8221;0&#8243;&#62; &#60;tr height=&#8221;350&#8243;&#62;&#60;td align=&#8221;center&#8221;&#62; &#60;table cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243; border=1 bordercolor=&#8221;black&#8221;&#62; &#60;tr&#62; &#60;td valign=&#8221;top&#8221;&#62; &#60;OBJECT ID=&#8221;MediaPlayer&#8221; WIDTH=&#8221;320&#8243; HEIGHT=&#8221;290&#8243; CLASSID=&#8221;CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95&#8243; STANDBY=&#8221;Loading Windows Media Player components&#8230;&#8221; TYPE=&#8221;application/x-oleobject&#8221;&#62; &#60;PARAM NAME=&#8221;URL&#8221; VALUE=&#8217;http://localhost/vinod/meeting_with_the_boss.wmv&#8217; /&#62; &#60;param name=&#8221;AudioStream&#8221; value=&#8221;0&#8243; /&#62; &#60;param name=&#8221;AutoSize&#8221; value=&#8221;1&#8243; /&#62; &#60;param name=&#8221;AutoStart&#8221; value=&#8221;-1&#8243; /&#62; &#60;param name=&#8221;AnimationAtStart&#8221; value=&#8221;1&#8243; /&#62; &#60;param name=&#8221;AllowScan&#8221; value=&#8221;-1&#8243; /&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>&lt;html&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;body leftmargin=&#8221;0&#8243; topmargin=&#8221;0&#8243;&gt;<br />
&lt;table cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243; border=&#8221;0&#8243;&gt;<br />
&lt;tr height=&#8221;350&#8243;&gt;&lt;td align=&#8221;center&#8221;&gt;<br />
&lt;table cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243; border=1 bordercolor=&#8221;black&#8221;&gt;<br />
&lt;tr&gt;<br />
&lt;td valign=&#8221;top&#8221;&gt;<br />
&lt;OBJECT ID=&#8221;MediaPlayer&#8221; WIDTH=&#8221;320&#8243; HEIGHT=&#8221;290&#8243; CLASSID=&#8221;CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95&#8243; STANDBY=&#8221;Loading Windows Media Player components&#8230;&#8221; TYPE=&#8221;application/x-oleobject&#8221;&gt;<br />
&lt;PARAM NAME=&#8221;URL&#8221; VALUE=&#8217;http://localhost/vinod/meeting_with_the_boss.wmv&#8217; /&gt;<br />
&lt;param name=&#8221;AudioStream&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;AutoSize&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;AutoStart&#8221; value=&#8221;-1&#8243; /&gt;<br />
&lt;param name=&#8221;AnimationAtStart&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;AllowScan&#8221; value=&#8221;-1&#8243; /&gt;<br />
&lt;param name=&#8221;AllowChangeDisplaySize&#8221; value=&#8221;-1&#8243; /&gt;<br />
&lt;param name=&#8221;AutoRewind&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;Balance&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;BufferingTime&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;ClickToPlay&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;CursorType&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;CurrentPosition&#8221; value=&#8221;-1&#8243; /&gt;<br />
&lt;param name=&#8221;CurrentMarker&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;DisplayBackColor&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;DisplayForeColor&#8221; value=&#8221;16777215&#8243; /&gt;<br />
&lt;param name=&#8221;DisplayMode&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;DisplaySize&#8221; value=&#8221;4&#8243; /&gt;<br />
&lt;param name=&#8221;Enabled&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;EnableContextMenu&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;EnableFullScreenControls&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;EnableTracker&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;Filename&#8221; VALUE=&#8217;http://localhost/vinod/meeting_with_the_boss.wmv&#8217;&gt;&lt;param name=&#8221;Mute&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;PlayCount&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;PreviewMode&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;SelectionStart&#8221; value=&#8221;-1&#8243; /&gt;<br />
&lt;param name=&#8221;SelectionEnd&#8221; value=&#8221;-1&#8243; /&gt;<br />
&lt;param name=&#8221;SendKeyboardEvents&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;SendMouseClickEvents&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;SendMouseMoveEvents&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;SendPlayStateChangeEvents&#8221; value=&#8221;-1&#8243; /&gt;<br />
&lt;param name=&#8221;ShowCaptioning&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;ShowAudioControls&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;ShowDisplay&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;ShowGotoBar&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;ShowPositionControls&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;ShowTracker&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;param name=&#8221;VideoBorderWidth&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;VideoBorderColor&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;VideoBorder3D&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;Volume&#8221; value=&#8221;-1&#8243; /&gt;<br />
&lt;param name=&#8221;WindowlessVideo&#8221; value=&#8221;0&#8243; /&gt;<br />
&lt;param name=&#8221;ShowStatusBar&#8221; value=&#8221;1&#8243; /&gt;<br />
&lt;PARAM name=&#8221;ShowControls&#8221; VALUE=&#8221;1&#8243; /&gt;<br />
&lt;PARAM name=&#8221;ShowControls&#8221; VALUE=&#8221;true&#8221; /&gt;<br />
&lt;param name=&#8221;ShowStatusBar&#8221; value=&#8221;true&#8221; /&gt;<br />
&lt;PARAM name=&#8221;ShowDisplay&#8221; VALUE=&#8221;false&#8221; /&gt;<br />
&lt;EMBED TYPE=&#8221;application/x-mplayer2&#8243; SRC=&#8217;http://localhost/vinod/meeting_with_the_boss.wmv&#8217; NAME=&#8221;MediaPlayer&#8221; WIDTH=&#8221;320&#8243; HEIGHT=&#8221;290&#8243; ShowControls=&#8221;1&#8243; ShowStatusBar=&#8221;1&#8243; ShowDisplay=&#8221;0&#8243; autostart=&#8221;1&#8243;&gt; &lt;/EMBED&gt;&lt;/OBJECT&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
<code><br />
You can view the live application <a href="./../window-media-player-demo.php" target="_blank">here</a><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/integrate-window-media-player-in-your-website/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>update query in symphony (Method 2)</title>
		<link>http://www.vinodkram.com/update-query-in-symphony</link>
		<comments>http://www.vinodkram.com/update-query-in-symphony#comments</comments>
		<pubDate>Mon, 22 Dec 2008 05:58:15 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://vinodkram.wordpress.com/?p=38</guid>
		<description><![CDATA[For example to execute query like UPDATE tableName SET column1 = 'abc',column2 = 'xyz' WHERE column ='1'; In symfony you can do it this way $c = new Criteria(); $c-&#62;add(MyTablePeer::COLUMN,1); $c-&#62;add(MyTablePeer::COLUMN1,'abc'); $c-&#62;add(MyTablePeer::COLUMN2,'xyz'); MyTablePeer::doUpdate($c); Thanks]]></description>
			<content:encoded><![CDATA[<p>For example to execute query like</p>
<pre class="php">UPDATE tableName SET column1 = <span class="st0">'abc'</span>,column2 = <span class="st0">'xyz'</span> WHERE column =<span class="nu0">'1';

In symfony you can do it this way

</span><span class="re0">$c</span> = <span class="kw2">new</span> Criteria<span class="br0">(</span><span class="br0">)</span>;
<span class="re0">$c</span>-&gt;<span class="me1">add</span><span class="br0">(</span>MyTablePeer::<span class="me2">COLUMN</span>,<span class="nu0">1</span><span class="br0">)</span>;
<span class="re0">$c</span>-&gt;<span class="me1">add</span><span class="br0">(</span>MyTablePeer::<span class="me2">COLUMN1</span>,<span class="st0">'abc'</span><span class="br0">)</span>;
<span class="re0">$c</span>-&gt;<span class="me1">add</span><span class="br0">(</span>MyTablePeer::<span class="me2">COLUMN2</span>,<span class="st0">'xyz'</span><span class="br0">)</span>;
MyTablePeer::<span class="me2">doUpdate</span><span class="br0">(</span><span class="re0">$c</span><span class="br0">)</span>;

Thanks</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/update-query-in-symphony/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Show tooltip on mouseover</title>
		<link>http://www.vinodkram.com/show-tooltip-on-mouseover</link>
		<comments>http://www.vinodkram.com/show-tooltip-on-mouseover#comments</comments>
		<pubDate>Wed, 10 Dec 2008 10:11:48 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://vinodkram.wordpress.com/?p=34</guid>
		<description><![CDATA[Step 1: Copy this css style code into your header tage right before the end of header tag &#60;style type=&#8221;text/css&#8221;&#62; #dhtmltooltip{ position: absolute; border: 1px solid red; width: 150px; padding: 2px; background-color: lightyellow; visibility: hidden; z-index: 100; filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=115); } &#60;/style&#62; Step 2 :Copy the following code into page with your body html tags &#60;div [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Step 1: </strong> Copy this css style code into your header tage right before the end of header tag</p>
<p>&lt;style type=&#8221;text/css&#8221;&gt;</p>
<p>#dhtmltooltip{<br />
position: absolute;<br />
border: 1px solid red;<br />
width: 150px;<br />
padding: 2px;<br />
background-color: lightyellow;<br />
visibility: hidden;<br />
z-index: 100;<br />
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=115);<br />
}</p>
<p>&lt;/style&gt;</p>
<p><strong>Step 2 :</strong>Copy the following code into page with your body html tags</p>
<p>&lt;div id=&#8221;dhtmltooltip&#8221;&gt;&lt;/div&gt;</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;</p>
<p>/***********************************************<br />
* Freejavascriptkit.com<br />
* Visit http://www.freejavascriptkit.com for more free Javascripts source code<br />
***********************************************/</p>
<p>var offsetxpoint=-60 //Customize x offset of tooltip<br />
var offsetypoint=20 //Customize y offset of tooltip<br />
var ie=document.all<br />
var ns6=document.getElementById &amp;&amp; !document.all<br />
var enabletip=false<br />
if (ie||ns6)<br />
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById(&#8220;dhtmltooltip&#8221;) : &#8220;&#8221;</p>
<p>function ietruebody(){<br />
return (document.compatMode &amp;&amp; document.compatMode!=&#8221;BackCompat&#8221;)? document.documentElement : document.body<br />
}</p>
<p>function ddrivetip(thetext, thecolor, thewidth){<br />
if (ns6||ie){<br />
if (typeof thewidth!=&#8221;undefined&#8221;) tipobj.style.width=thewidth+&#8221;px&#8221;<br />
if (typeof thecolor!=&#8221;undefined&#8221; &amp;&amp; thecolor!=&#8221;") tipobj.style.backgroundColor=thecolor<br />
tipobj.innerHTML=thetext<br />
enabletip=true<br />
return false<br />
}<br />
}</p>
<p>function positiontip(e){<br />
if (enabletip){<br />
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;<br />
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;<br />
//Find out how close the mouse is to the corner of the window<br />
var rightedge=ie&amp;&amp;!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20<br />
var bottomedge=ie&amp;&amp;!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20</p>
<p>var leftedge=(offsetxpoint&lt;0)? offsetxpoint*(-1) : -1000</p>
<p>//if the horizontal distance isn&#8217;t enough to accomodate the width of the context menu<br />
if (rightedge&lt;tipobj.offsetWidth)<br />
//move the horizontal position of the menu to the left by it&#8217;s width<br />
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+&#8221;px&#8221; : window.pageXOffset+e.clientX-tipobj.offsetWidth+&#8221;px&#8221;<br />
else if (curX&lt;leftedge)<br />
tipobj.style.left=&#8221;5px&#8221;<br />
else<br />
//position the horizontal position of the menu where the mouse is positioned<br />
tipobj.style.left=curX+offsetxpoint+&#8221;px&#8221;</p>
<p>//same concept with the vertical position<br />
if (bottomedge&lt;tipobj.offsetHeight)<br />
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+&#8221;px&#8221; : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+&#8221;px&#8221;<br />
else<br />
tipobj.style.top=curY+offsetypoint+&#8221;px&#8221;<br />
tipobj.style.visibility=&#8221;visible&#8221;<br />
}<br />
}</p>
<p>function hideddrivetip(){<br />
if (ns6||ie){<br />
enabletip=false<br />
tipobj.style.visibility=&#8221;hidden&#8221;<br />
tipobj.style.left=&#8221;-1000px&#8221;<br />
tipobj.style.backgroundColor=&#8221;<br />
tipobj.style.width=&#8221;<br />
}<br />
}</p>
<p>document.onmousemove=positiontip</p>
<p>&lt;/script&gt;</p>
<p><strong>Step 3: Add the following code to your link or page element which needs a tool tip</strong></p>
<p>onMouseover=&#8221;ddrivetip(&#8216;Free javascripts from www.freejavascriptkit.com&#8217;,'lightgreen&#8217;, 300)&#8221;;<br />
onMouseout=&#8221;hideddrivetip()&#8221;</p>
<p>Note : You can refer more detail on &#8220;http://www.freejavascriptkit.com/free_javascripts/tooltip_hint/dhtml_mouseover_tooltip.html&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/show-tooltip-on-mouseover/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorting a two dimensional array in javascript</title>
		<link>http://www.vinodkram.com/sorting-a-two-dimensional-array-in-javascript</link>
		<comments>http://www.vinodkram.com/sorting-a-two-dimensional-array-in-javascript#comments</comments>
		<pubDate>Tue, 02 Sep 2008 12:10:56 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://vinodkram.wordpress.com/?p=32</guid>
		<description><![CDATA[function sortArray(x,y) { return ((x[1] &#60; y[1]) ? -1 : ((x[1] &#62; y[1]) ? 1 : 0)); } var givenarr = [[0,8],[1,9],[2,7]]; givenarr.sort(sortArray); ======================== The result array will be givenarr = [[2,7],[0,8],[1,9]];]]></description>
			<content:encoded><![CDATA[<p>function sortArray(x,y)<br />
{<br />
return ((x[1] &lt; y[1]) ? -1 : ((x[1] &gt; y[1]) ? 1 : 0));<br />
}</p>
<p>var givenarr = [[0,8],[1,9],[2,7]];</p>
<p>givenarr.sort(sortArray);</p>
<p>========================</p>
<p>The result array will be givenarr = [[2,7],[0,8],[1,9]];</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vinodkram.com/sorting-a-two-dimensional-array-in-javascript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

