<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Programming Ideas, Logics, Tips and Tricks &#187; notification</title>
	<atom:link href="http://www.sajithmr.me/tag/notification/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sajithmr.me</link>
	<description></description>
	<lastBuildDate>Sat, 07 Apr 2012 16:30:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>JBar &#8211; Jquery Bar</title>
		<link>http://www.sajithmr.me/jbar-jquery-bar</link>
		<comments>http://www.sajithmr.me/jbar-jquery-bar#comments</comments>
		<pubDate>Sun, 27 Dec 2009 11:47:33 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webworld]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[jbar]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=545</guid>
		<description><![CDATA[Flash messages or notification messages are very essential part of every update/edit or delete operations. We either use ajax update messages like &#8220;You account has been updated&#8221; or &#8220;Your photo has been successfully deleted&#8221; Here, a new plugin of jQuery can be used to display the flash messages like twitter. (see twitter&#8217;s settings page) I [...]]]></description>
			<content:encoded><![CDATA[<p>Flash messages or notification messages are very essential part of every update/edit or delete operations. We either use ajax update messages like &#8220;You account has been updated&#8221; or &#8220;Your photo has been successfully deleted&#8221;</p>
<p>Here, a new plugin of jQuery can be used to display the flash messages like twitter. (see twitter&#8217;s settings page)</p>
<p>I added some more functions to this plugin to display the notification in different context, say information, warning or error message. The function show_flash(&#8216;message here&#8217;); can be used for this purpose. Second parameter is the type of message. For example, show_flash(&#8216;Error in deleting file&#8217;, &#8216;error&#8217;) OR  show_flash(&#8216;Email address entered is invalid&#8217;, &#8216;warning&#8217;)</p>
<p>If you use sessions to save flash message , for example in codeigniter $this-&gt;session-&gt;set_flashdata(&#8216;message&#8217;,'hello&#8217;); you can use this plugin to display them by adding a php code in the footer  (or header) of every page</p>
<p>&lt;?php if($this-&gt;session-&gt;flashdata(&#8216;message&#8217;) != &#8221; )  : ?&gt;</p>
<p>&lt;script&gt;show_flash(&#8216;&lt;?= $this-&gt;session-&gt;flashdata(&#8216;message&#8217;) ?&gt;&#8217;)&lt;/script&gt;</p>
<p>&lt;?php endif; ?&gt;</p>
<p>Here you can download the full source code:  <a href="http://www.sajithmr.me/downloads/jbar.zip">http://www.sajithmr.me/downloads/jbar.zip</a></p>
<p><img class="alignnone size-large wp-image-566" title="Screen shot 2009-12-27 at 11.30.12" src="http://www.sajithmr.me/wp-content/uploads/2009/12/Screen-shot-2009-12-27-at-11.30.12-1024x182.png" alt="Screen shot 2009-12-27 at 11.30.12" width="717" height="127" /></p>
<p>Thanks</p>
<p>Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/jbar-jquery-bar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gmail Chat Implementation</title>
		<link>http://www.sajithmr.me/gmail-chat-implementation</link>
		<comments>http://www.sajithmr.me/gmail-chat-implementation#comments</comments>
		<pubDate>Wed, 07 May 2008 10:30:34 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[gtalk]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[notification]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/gmail-chat-implementation/</guid>
		<description><![CDATA[Today i implemented gmail chat window , not an ajax chat with a chat server, but its client side implementation. Here you can see the demo: http://www.sajithmr.com/gtalk/ Take this link in a new tab or window, and take any other website without closing it. After 3 seconds , (Consider it as a new chat message [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/05/screenshot.jpg" /></p>
<p>Today i implemented gmail chat window , not an ajax chat with a chat server, but its client side implementation.</p>
<p>Here you can see the demo: <font size="4"> <a href="http://www.sajithmr.com/gtalk/" title="Gmail Chat Implementation" target="_blank">http://www.sajithmr.com/gtalk/</a></font></p>
<p>Take this link in a new tab or window, and take any other website without closing it.</p>
<p>After 3 seconds , (Consider it as a new chat message arrived situation) you can see the google chat notification sound , and title changing. (I didn&#8217;t get the actual gtalk notification sound, so i used windows notify.wav file )</p>
<p>You know google (gmail) implemented its sound notification is  via swf object. Here  me too done the same.</p>
<p>I wrote two function to check whether the browser is in focus or not.</p><pre class="crayon-plain-tag"><code></code></pre><p>Here is the functions:</p><pre class="crayon-plain-tag"><code>function lostFocus()
{
document.title = 'Sajith M.R Says...';
state = 'nonfocus';

played =  0 ;

changeColorRed();

alterTitle();

}

function gotFocus()
{
document.title = 'Gmail Inbox(1)';

state = 'focus';

played = 0 ;
}</code></pre><p><p>
The    alterTitle() function calls in 3 seconds setTimeOut manner.</p><pre class="crayon-plain-tag"><code>function alterTitle()
{

if(state =='nonfocus')

{
if ( document.title == 'Gmail Inbox(1)')
{

if(played == 0)
{
soundManager.play('notify');
played = 1;
}

document.title = 'Sajith M.R Says...';

}
else
document.title = 'Gmail Inbox(1)';

setTimeout(&quot;alterTitle()&quot;,3000);

}
}</code></pre><p><p><p>
The soundmanager.js file handles the swf flash object and sound triggering.</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;script/soundmanager.js&#8221;&gt;&lt;/script&gt;</p>
<p>These three simple scripts together created this demo:<font size="4"> <a href="http://www.sajithmr.com/gtalk/" title="Gmail Chat Implementation" target="_blank">http://www.sajithmr.com/gtalk/</a></font></p>
<p>If you want the whole source code , mail me: <a href="mailto://admin@sajithmr.com">admin@sajithmr.com </a></p>
<p>Comment Please &#8230;</p>
<p>Regards</p>
<p>Sajith.M.R<br />
<a href="http://www.sajith.name/" title="Sajith">http://www.sajith.name </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/gmail-chat-implementation/feed</wfw:commentRss>
		<slash:comments>36</slash:comments>
	
		<series:name><![CDATA[Gmail Architecture]]></series:name>
	</item>
	</channel>
</rss>

