<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;CUEDQX87eyp7ImA9WhRUFko.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427</id><updated>2012-01-27T19:44:30.103+05:30</updated><category term="Adobe" /><category term="Software" /><category term="Hardware" /><category term="Life" /><category term="Microsoft" /><category term="Internet" /><category term="javascript" /><category term="Oracle" /><category term="Apple" /><category term="Open Source" /><title>Inspiration of CuttingEdge Technology</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>103</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/InspirationCuttingEdgeTechnology" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="inspirationcuttingedgetechnology" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">InspirationCuttingEdgeTechnology</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;CEYDQXk7fCp7ImA9WhZQEkU.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-8658083836510605699</id><published>2011-04-20T12:12:00.001+05:30</published><updated>2011-04-20T12:19:30.704+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-20T12:19:30.704+05:30</app:edited><title>A solution for PHP fopen from url issue</title><content type="html">&lt;p&gt;I had to read a web page and grab values and show on my web page by using PHP. The easiest way came to my mind was &lt;a title="fopen" href="http://php.net/manual/en/function.fopen.php" target="_blank"&gt;"fopen"&lt;/a&gt;. When I develop that on my local machine it worked perfectly but when I put that on live site it was not reading from external URL. If I need to continue on that I have to modify php.ini file to allow access which is not possible on&amp;nbsp; a shared hosting. So it was tie to Google and find a better solution. And I found one and thought to share it with you all.&lt;/p&gt;&lt;p&gt;This following php code developed by &lt;a href="http://www.webdeveloper.com/forum/member.php?u=85791" target="_blank"&gt;knkk&lt;/a&gt; and was shared on &lt;a title="web developer" href="http://www.webdeveloper.com/forum/showthread.php?t=230985" target="_blank"&gt;http://www.webdeveloper.com/forum/showthread.php?t=230985&lt;/a&gt;&lt;/p&gt;&lt;pre class="brush:php"&gt;function disguise_curl($url)
{
$curl = curl_init(); 

// setup headers - used the same headers from Firefox version 2.0.0.6
// below was split up because php.net said the line was too long. :/
$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
$header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
$header[] = "Cache-Control: max-age=0";
$header[] = "Connection: keep-alive";
$header[] = "Keep-Alive: 300";
$header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$header[] = "Accept-Language: en-us,en;q=0.5";
$header[] = "Pragma: "; //browsers keep this blank. 

curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3');
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_REFERER, 'http://www.google.com');
curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($curl, CURLOPT_AUTOREFERER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 10); 

$html = curl_exec($curl); //execute the curl command
if (!$html)
{
echo "cURL error number:" .curl_errno($ch);
echo "cURL error:" . curl_error($ch);
exit;
}

curl_close($curl); //close the connection 

return $html; //and finally, return $html
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-8658083836510605699?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/8658083836510605699/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2011/04/php-fopen-from-url-issue.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8658083836510605699?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8658083836510605699?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2011/04/php-fopen-from-url-issue.html" title="A solution for PHP fopen from url issue" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;C0AER348fip7ImA9WhZQEkU.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-5834047300591776603</id><published>2011-04-20T11:45:00.003+05:30</published><updated>2011-04-20T12:11:46.076+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-20T12:11:46.076+05:30</app:edited><title>Format Javascript</title><content type="html">&lt;p&gt;I had to analyze and change a JavaScript if it is required, but it was a big huge JavaScript file and all the code was on one line. So it was the time to find a good was to do format the JS.&lt;/p&gt;&lt;p&gt;I found following site and thought to share it with you all. &lt;a title="Javascript unpacker and beautifier" href="http://jsbeautifier.org/" target="_blank"&gt;http://jsbeautifier.org/&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-5834047300591776603?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/5834047300591776603/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2011/04/format-javascript.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5834047300591776603?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5834047300591776603?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2011/04/format-javascript.html" title="Format Javascript" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DUEFR3w_eyp7ImA9WhZRE08.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-3369247480006030713</id><published>2011-04-09T09:52:00.000+05:30</published><updated>2011-04-09T11:10:16.243+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-09T11:10:16.243+05:30</app:edited><title>Definer issue on MySQL</title><content type="html">&lt;p&gt;I had a main issue when I am trying to deploy a PHP, MySQL project by using CPanel. This might be occurred on any hosting provider. The issue is I have stored procedures on MySQL and when deploying it says I cannot deploy procedures which contains &amp;lsquo;DEFINER&amp;rsquo; in it.&lt;/p&gt;&lt;p&gt;So what I did is remove all the &amp;lsquo;DEFINER&amp;rsquo; parts on procedures and executed the MySQL dump file. It went alright. But when we connect to PHPMyAdmin via CPanel the logged in user is same as CPanel user. On MySQL if there is no definer on a procedure it generates the currently logged in user.&lt;/p&gt;&lt;p&gt;Now I have procedures with a CPanel user but my PHP code is connected to that DB by using a MySQL defined user. When I am trying to browse the site it throws an error saying Definer is different. Then I was in the middle of a dead lock.&lt;br /&gt;Then what I thought was to execute the create procedures by using PHP. Then definer will be same as PHP connected user to MySQL. So I had to write a PHP code to read the MySQL dump file and build the DB for me.&lt;/p&gt;&lt;p&gt;It was a success so far. My delimiter used id &amp;lsquo;$$&amp;rsquo; and if your one is different please change that on code. And also I had to remove comment lines and &amp;lsquo;DELIMITER&amp;rsquo; changing lines (this line gave me an error).&lt;/p&gt;&lt;p&gt;Please use this for good and if there was any modification you have done to improve this, I hope you will share with us.&lt;/p&gt;&lt;p&gt;And also if there is any part that you cannot understand, have any issues with please come to me.&lt;/p&gt;&lt;pre class="brush:php"&gt;&lt;br /&gt;$mysql_host = 'localhost';&lt;br /&gt;$mysql_username = 'root';&lt;br /&gt;$mysql_password = '';&lt;br /&gt;$mysql_database = 'test';&lt;br /&gt;&lt;br /&gt;mysql_connect($mysql_host, $mysql_username, $mysql_password) or die('Error connecting ' . mysql_error());&lt;br /&gt;&lt;br /&gt;mysql_select_db($mysql_database) or die('Error MySQL database ' . mysql_error());&lt;br /&gt;&lt;br /&gt; RestoreDumpFile('mySQLdumpfile.sql');&lt;br /&gt;&lt;br /&gt; function RestoreDumpFile($filename)&lt;br /&gt; {&lt;br /&gt; $delimiter = ';';&lt;br /&gt; $currentQuery = '';&lt;br /&gt;&lt;br /&gt; $lineCollection = file($filename);&lt;br /&gt;&lt;br /&gt; foreach ($lineCollection as $line)&lt;br /&gt; {&lt;br /&gt;  //in this my current delimiter was ; and then for procs it was $$&lt;br /&gt;  if(strpos($line,'DELIMITER') !== false)&lt;br /&gt;  {&lt;br /&gt;   $delimiter = '$$';&lt;br /&gt;   continue;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  //removed comments and DELIMITER changing lines&lt;br /&gt;  if (substr($line, 0, 2) == '--' || $line == '' || substr($line, 0, 2) == '/*' || strrpos($line,'DELIMITER') )&lt;br /&gt;  {&lt;br /&gt;   continue;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  //current query generated over line by line&lt;br /&gt;  $currentQuery .= $line;&lt;br /&gt;&lt;br /&gt;  //if delimiter was found then time to execute query&lt;br /&gt;  if (substr(trim($line), strlen(trim($line))-strlen($delimiter), strlen($delimiter)) == $delimiter)&lt;br /&gt;  {&lt;br /&gt;   if($delimiter != ';')&lt;br /&gt;    {&lt;br /&gt;    $currentQuery = substr($currentQuery, 0, strlen($currentQuery)-(strlen($delimiter)+1));&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;   //remove definer&lt;br /&gt;   //if definer is there and you do not have super powers it gives an error&lt;br /&gt;   if(strpos($currentQuery,'DEFINER') !== false)&lt;br /&gt;   {&lt;br /&gt;    $firstpart = substr($currentQuery,0,strpos($currentQuery,'DEFINER'));&lt;br /&gt;    $secondpart = substr($currentQuery,strpos($currentQuery,'DEFINER'));&lt;br /&gt;    $thirdpart = substr($secondpart,strpos($secondpart,' '));&lt;br /&gt;&lt;br /&gt;    $currentQuery = $firstpart.$thirdpart;&lt;br /&gt;   }&lt;br /&gt;   echo $currentQuery.'&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;';&lt;br /&gt;&lt;br /&gt;   mysql_query($currentQuery) or print('Error on - ' . $currentQuery . ' : ' . mysql_error() . '&lt;br /&gt;');&lt;br /&gt;   $currentQuery = '';&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-3369247480006030713?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/3369247480006030713/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2011/04/definer-issue-on-mysql.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/3369247480006030713?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/3369247480006030713?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2011/04/definer-issue-on-mysql.html" title="Definer issue on MySQL" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEIAQXg9eCp7ImA9Wx9XEkw.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-2551768696960163922</id><published>2011-01-05T12:59:00.000+05:30</published><updated>2011-01-05T12:59:00.660+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-05T12:59:00.660+05:30</app:edited><title>NASA - 2012: Beginning of the End or Why the World Won't End?</title><content type="html">There is a big heho going on about the end of earth on 2012. But I like you to quote what NASA says about that. I believe what they say.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Remember the Y2K scare? It came and went without much of a whimper because of adequate planning and analysis of the situation. Impressive movie special effects aside, Dec. 21, 2012, won't be the end of the world as we know. It will, however, be another winter solstice. &lt;br /&gt;
&lt;br /&gt;
Much like Y2K, 2012 has been analyzed and the science of the end of the Earth thoroughly studied. Contrary to some of the common beliefs out there, the science behind the end of the world quickly unravels when pinned down to the 2012 timeline. Below, NASA Scientists answer several questions that we're frequently asked regarding 2012.&lt;br /&gt;
&lt;br /&gt;
Question (Q): Are there any threats to the Earth in 2012? Many Internet websites say the world will end in December 2012.&lt;br /&gt;
Answer (A): Nothing bad will happen to the Earth in 2012. Our planet has been getting along just fine for more than 4 billion years, and credible scientists worldwide know of no threat associated with 2012. &lt;br /&gt;
&lt;br /&gt;
Q: What is the origin of the prediction that the world will end in 2012?&lt;br /&gt;
A: The story started with claims that Nibiru, a supposed planet discovered by the Sumerians, is headed toward Earth. This catastrophe was initially predicted for May 2003, but when nothing happened the doomsday date was moved forward to December 2012. Then these two fables were linked to the end of one of the cycles in the ancient Mayan calendar at the winter solstice in 2012 -- hence the predicted doomsday date of December 21, 2012.&lt;br /&gt;
&lt;br /&gt;
Q: Does the Mayan calendar end in December 2012?&lt;br /&gt;
A: Just as the calendar you have on your kitchen wall does not cease to exist after December 31, the Mayan calendar does not cease to exist on December 21, 2012. This date is the end of the Mayan long-count period but then -- just as your calendar begins again on January 1 -- another long-count period begins for the Mayan calendar.&lt;br /&gt;
&lt;br /&gt;
Q: Could a phenomena occur where planets align in a way that impacts Earth?&lt;br /&gt;
A: There are no planetary alignments in the next few decades, Earth will not cross the galactic plane in 2012, and even if these alignments were to occur, their effects on the Earth would be negligible. Each December the Earth and sun align with the approximate center of the Milky Way Galaxy but that is an annual event of no consequence. &lt;br /&gt;
&lt;br /&gt;
"There apparently is a great deal of interest in celestial bodies, and their locations and trajectories at the end of the calendar year 2012. Now, I for one love a good book or movie as much as the next guy. But the stuff flying around through cyberspace, TV and the movies is not based on science. There is even a fake NASA news release out there..."&lt;br /&gt;
- Don Yeomans, NASA senior research scientistQ: Is there a planet or brown dwarf called Nibiru or Planet X or Eris that is approaching the Earth and threatening our planet with widespread destruction?&lt;br /&gt;
A: Nibiru and other stories about wayward planets are an Internet hoax. There is no factual basis for these claims. If Nibiru or Planet X were real and headed for an encounter with the Earth in 2012, astronomers would have been tracking it for at least the past decade, and it would be visible by now to the naked eye. Obviously, it does not exist. Eris is real, but it is a dwarf planet similar to Pluto that will remain in the outer solar system; the closest it can come to Earth is about 4 billion miles. &lt;br /&gt;
&lt;br /&gt;
Q: What is the polar shift theory? Is it true that the earth’s crust does a 180-degree rotation around the core in a matter of days if not hours? &lt;br /&gt;
A: A reversal in the rotation of Earth is impossible. There are slow movements of the continents (for example Antarctica was near the equator hundreds of millions of years ago), but that is irrelevant to claims of reversal of the rotational poles. However, many of the disaster websites pull a bait-and-shift to fool people. They claim a relationship between the rotation and the magnetic polarity of Earth, which does change irregularly, with a magnetic reversal taking place every 400,000 years on average. As far as we know, such a magnetic reversal doesn’t cause any harm to life on Earth. A magnetic reversal is very unlikely to happen in the next few millennia, anyway. &lt;br /&gt;
&lt;br /&gt;
Earth, as seen in the Blue Marble: Next Generation collection of images, showing the color of the planet's surface in high resolution. This image shows South America from September 2004.Q: Is the Earth in danger of being hit by a meteor in 2012?&lt;br /&gt;
A: The Earth has always been subject to impacts by comets and asteroids, although big hits are very rare. The last big impact was 65 million years ago, and that led to the extinction of the dinosaurs. Today NASA astronomers are carrying out a survey called the Spaceguard Survey to find any large near-Earth asteroids long before they hit. We have already determined that there are no threatening asteroids as large as the one that killed the dinosaurs. All this work is done openly with the discoveries posted every day on the NASA NEO Program Office website, so you can see for yourself that nothing is predicted to hit in 2012.&lt;br /&gt;
&lt;br /&gt;
Q: How do NASA scientists feel about claims of pending doomsday?&lt;br /&gt;
A: For any claims of disaster or dramatic changes in 2012, where is the science? Where is the evidence? There is none, and for all the fictional assertions, whether they are made in books, movies, documentaries or over the Internet, we cannot change that simple fact. There is no credible evidence for any of the assertions made in support of unusual events taking place in December 2012. &lt;br /&gt;
&lt;br /&gt;
Q: Is there a danger from giant solar storms predicted for 2012?&lt;br /&gt;
A: Solar activity has a regular cycle, with peaks approximately every 11 years. Near these activity peaks, solar flares can cause some interruption of satellite communications, although engineers are learning how to build electronics that are protected against most solar storms. But there is no special risk associated with 2012. The next solar maximum will occur in the 2012-2014 time frame and is predicted to be an average solar cycle, no different than previous cycles throughout history.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
From &lt;a href="http://www.nasa.gov/topics/earth/features/2012.html"&gt;2012: Beginning of the End or Why the World Won't End?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-2551768696960163922?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/2551768696960163922/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2011/01/nasa-2012-beginning-of-end-or-why-world.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/2551768696960163922?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/2551768696960163922?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2011/01/nasa-2012-beginning-of-end-or-why-world.html" title="NASA - 2012: Beginning of the End or Why the World Won't End?" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;DEcMR3s-fSp7ImA9Wx5WF0o.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-155198244173049759</id><published>2010-09-15T11:17:00.002+05:30</published><updated>2010-09-29T21:31:26.555+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-29T21:31:26.555+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><title>Why Why there is no Trim function on JS</title><content type="html">&lt;p&gt;It was pretty bad when you find that the JS dos not have a inbuilt function on strings to do Trim. But not to worry. It can be&amp;nbsp;implemented&amp;nbsp;easily.&lt;/p&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;function LTrim(str){
  var whitespace = new String(" \t\n\r");
  var s = new String(str);
  
  if (whitespace.indexOf(s.charAt(0)) != -1) {
    var j=0, i = s.length;
    while (j &amp;lt; i &amp;amp;&amp;amp; whitespace.indexOf(s.charAt(j)) != -1)
      j++;
    s = s.substring(j, i);
  }
  return s;
}

function RTrim(str){
  var whitespace = new String(" \t\n\r");
  var s = new String(str);

  if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
    var i = s.length - 1;
    while (i &gt;= 0 &amp;&amp; whitespace.indexOf(s.charAt(i)) != -1)
      i--;
    s = s.substring(0, i+1);
  }
  return s;
}

function Trim(str){
  return RTrim(LTrim(str));
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-155198244173049759?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/155198244173049759/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2010/09/why-why-there-is-no-trim-function-on-js.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/155198244173049759?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/155198244173049759?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2010/09/why-why-there-is-no-trim-function-on-js.html" title="Why Why there is no Trim function on JS" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Dk8BRXk-eCp7ImA9Wx5QFE0.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-1419965550169741461</id><published>2010-09-02T10:50:00.001+05:30</published><updated>2010-09-02T10:50:54.750+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-02T10:50:54.750+05:30</app:edited><title>Download file by IE error with SSL</title><content type="html">&lt;p&gt;It took a long time to figure out what was going wrong since on all the other browsers the file was able to download but IE (6,7 &amp;amp; 8) . Tried a lot of things which the forums said but at last at last found the solution.&lt;/p&gt;&lt;p&gt;Microsoft agrees this as an issue of IE and they have given the patch here.&amp;nbsp;&lt;a href="http://support.microsoft.com/kb/323308"&gt;http://support.microsoft.com/kb/323308&lt;/a&gt;&lt;/p&gt;&lt;p&gt;And also if a header was added as&amp;nbsp;&lt;span style="font-family: arial, verdant, helvetica, sans-serif; font-size: 13px; border-collapse: collapse;"&gt;"CACHE-CONTROL":"NO-CACHE" it will not work on IE even with the fix MS given. It should be changed as "Cache-control:no-store".&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-1419965550169741461?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/1419965550169741461/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2010/09/download-file-by-ie-error-with-ssl.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/1419965550169741461?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/1419965550169741461?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2010/09/download-file-by-ie-error-with-ssl.html" title="Download file by IE error with SSL" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DEQCQns7fCp7ImA9Wx5QFkw.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-387251559257219105</id><published>2010-08-27T15:20:00.001+05:30</published><updated>2010-09-04T21:36:03.504+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-04T21:36:03.504+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>JQuery API control functions</title><content type="html">&lt;p&gt;&lt;img src="http://hoth.entp.com/assets/2010/7/26/jquery_logo_color_onwhite.png" alt="JQuery Logo" width="500" /&gt;&lt;/p&gt;&lt;p&gt;Image from &lt;span style="font-family: arial; font-size: 13px; color: #228822; line-height: 15px;"&gt;hoth.entp.com&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I was doing&amp;nbsp;JavaScript&amp;nbsp;for few years and it was little bit hard to work with "write less, do more" at first few times. Always it comes to my mind as JavaScript (yes I know it is) so I am trying to apply some functions as document.getElementById. And when I wanted to hide and show elements it was style:none and block.Those look bad(when a better way is there) on jQuery and some of them may not work on jQuery elements. OK I am not here to teach you neither JavaScript nor jQuery. For the people like me it is strongly&amp;nbsp;recommended&amp;nbsp;(by me of course) to take a look at the&amp;nbsp;available&amp;nbsp;and right functions on &lt;a href="http://api.jquery.com/" target="_blank"&gt;jQuery API official site&lt;/a&gt;.t I just found that and thought to share that. If you got a better place or some useful links please share it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-387251559257219105?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/387251559257219105/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2010/08/jquery-api-control-functions.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/387251559257219105?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/387251559257219105?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2010/08/jquery-api-control-functions.html" title="JQuery API control functions" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0YHQX49eCp7ImA9Wx5WF0o.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-1513413696358639685</id><published>2010-05-25T11:04:00.002+05:30</published><updated>2010-09-29T21:15:30.060+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-29T21:15:30.060+05:30</app:edited><title>A JavaScript Alert as I want</title><content type="html">There are alerts and confirms on JS as you all know. But its look and feel is same old style. I was curious whether we can change it. Of cause we are normally using a div tag and apply some styles to the background to gray out. Then we can use it as a function and call it whenever we need an alert. Isn’t there a better way to do that? I mean much easier way. So what I have tried to do was override the alert functionality on JS and give a customized method to do the job. So then what happens is we don’t need to change the code on each and every place where it used &lt;span style="color: #666666;"&gt;alert(“this is message”);&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
I have found the way to this on &lt;a href="http://slayeroffice.com/code/custom_alert/" linkindex="14"&gt;http://slayeroffice.com/code/custom_alert/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This place can be changed so I have pasted the JS code also in here.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:jscript" name="code"&gt;// constants to define the title of the alert and button text.
var ALERT_TITLE = "Oops!";
var ALERT_BUTTON_TEXT = "Ok";

// over-ride the alert method only if this a newer browser.
// Older browser will see standard alerts
if(document.getElementById) {
 window.alert = function(txt) {
  createCustomAlert(txt);
 }
}

function createCustomAlert(txt) {
 // shortcut reference to the document object
 d = document;

 // if the modalContainer object already exists in the DOM, bail out.
 if(d.getElementById("modalContainer")) return;

 // create the modalContainer div as a child of the BODY element
 mObj = d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));
 mObj.id = "modalContainer";
  // make sure its as tall as it needs to be to overlay all the content on the page
 mObj.style.height = document.documentElement.scrollHeight + "px";

 // create the DIV that will be the alert 
 alertObj = mObj.appendChild(d.createElement("div"));
 alertObj.id = "alertBox";
 // MSIE doesnt treat position:fixed correctly, so this compensates for positioning the alert
 if(d.all &amp;amp;&amp;amp; !window.opera) alertObj.style.top = document.documentElement.scrollTop + "px";
 // center the alert box
 alertObj.style.left = (d.documentElement.scrollWidth - alertObj.offsetWidth)/2 + "px";

 // create an H1 element as the title bar
 h1 = alertObj.appendChild(d.createElement("h1"));
 h1.appendChild(d.createTextNode(ALERT_TITLE));

 // create a paragraph element to contain the txt argument
 msg = alertObj.appendChild(d.createElement("p"));
 msg.innerHTML = txt;
 
 // create an anchor element to use as the confirmation button.
 btn = alertObj.appendChild(d.createElement("a"));
 btn.id = "closeBtn";
 btn.appendChild(d.createTextNode(ALERT_BUTTON_TEXT));
 btn.href = "#";
 // set up the onclick event to remove the alert when the anchor is clicked
 btn.onclick = function() { removeCustomAlert();return false; }

 
}

// removes the custom alert from the DOM
function removeCustomAlert() {
 document.getElementsByTagName("body")[0].removeChild(document.getElementById("modalContainer"));
}

&lt;/pre&gt;&lt;br /&gt;
You just have to include this JS code in a shared place over the web site as for example on a master page. And then all the alerts will be modified as shown when you clicked Test the alert button. But there is another trick. The site does not mentioned about the styles used on this alert. So I have grabbed them also by using a Firefox add-on called firebug. So you may need those CSS class too or you can modify them as you want the alerts. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:css" name="code"&gt;element.style  {
     display:block;
     left:559.5px;
}
#modalContainer &amp;gt; #alertBox {
     position:fixed;
}
#alertBox {
     background-color:#F2F5F6;
     background-image:url("alert.png");
     background-position:20px 30px;
     background-repeat:no-repeat;
     border:2px solid #000000;
     margin-top:50px;
     min-height:100px;
     position:relative;
     width:300px;
}
element.style  {
     height:1556px;
}
#modalContainer {
     background-color:transparent;
     background-image:url("tp.png");
     height:100%;
     left:0;
     position:absolute;
     top:0;
     width:100%;
     z-index:10000;
}
#alertBox h1 {
     background-color:#78919B;
     border-bottom:1px solid #000000;
     color:#FFFFFF;
     font:bold 0.9em verdana,arial;
     margin:0;
     padding:2px 0 2px 5px;
}
h1, h2 {
     border-bottom:1px solid #000000;
     font:bold 1.5em verdana;
     margin:0;
     padding:4px;
}
#alertBox p {
     font:0.7em verdana,arial;
     height:50px;
     margin-left:55px;
     padding-left:5px;
}
#alertBox #closeBtn {
     background-color:#78919B;
     border:2px solid #000000;
     color:#FFFFFF;
     display:block;
     font:0.7em verdana,arial;
     margin:5px auto;
     padding:3px;
     position:relative;
     text-align:center;
     text-decoration:none;
     text-transform:uppercase;
     width:70px;
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-1513413696358639685?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/1513413696358639685/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2010/05/javascript-alert-as-i-want.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/1513413696358639685?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/1513413696358639685?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2010/05/javascript-alert-as-i-want.html" title="A JavaScript Alert as I want" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DUcARXY9eyp7ImA9Wx5WF0o.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-8756276863385911490</id><published>2010-01-22T17:40:00.002+05:30</published><updated>2010-09-29T21:47:24.863+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-29T21:47:24.863+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft" /><title>How to call a web method by JavaScript</title><content type="html">I didn’t get a time to write something here for a long time. Yes I can say I was busy. (But I was not :)) Anyway I thought to write about something finally and I promise (this is a serious promise) that I will try to do something (do a posting actually) on my blog more frequently.&lt;br /&gt;
The ability to call the web methods by JavaScript on .net is very very useful and we can implement the web pages more efficiently by using this. For example we do not need to send whole page and update. Yes this is AJAX (that what I think).  &lt;br /&gt;
Here is a web method example. It should be on the aspx page code behind and should be a static (shared) method. I have tried to insert the web methods on user controls and was unable to do so (if you know a way please share with us). This is on VB.net. &lt;br /&gt;
&lt;pre class="brush:vb"&gt;&lt;WebMethod()&gt; _
 Public Shared Function GetMyData(ByVal studentID As Integer, ByVal schoolID As Integer) As Student
        Dim studentService As New StudentService()
        Dim result As Student = studentService.GetStudent(studentID, schoolID)
        Return result
    End Function
&lt;/pre&gt;&lt;br /&gt;
GetMyData method will create a Student entity based on the IDs passed in and this method can even call to DB to get the data (since this is on server side we can do anything).&lt;br /&gt;
Then this method (GetMyData) needs to be executed by JavaScript. Here is the example on how to do that.&lt;br /&gt;
&lt;pre class="brush:jscript"&gt;this.GetStudent = function(args)
    {        
        PageMethods.GetMyData(_studentID, _ schoolID, _this.UpdateStudentFields, _this.ServiceError);
    }
&lt;/pre&gt;&lt;br /&gt;
In here if you have noticed I have send 2 more parameters (_this.UpdateStudentFields, _this.ServiceError) than the web method accepts. (Was not by any mistake:))&lt;br /&gt;
_this.UpdateStudentFields – is the JavaScript method name that will execute when we returned from the web method. So basically what happens is Student entity will be passed into this method (UpdateStudentFields) as the result. So then we can do anything by JavaScript by using this result entity. &lt;br /&gt;
&lt;pre class="brush:jscript"&gt;this. UpdateStudentFields = function(result)
    {        
        if (result.Succeeded)
        {
        //assign the values to the fields
        //studentname = result.Name;
        }
    }
&lt;/pre&gt;&lt;br /&gt;
_this.ServiceError – this is the javascript method name that executes if there were any exceptions. So then we can do anything even with the error (exception actually). I prefer to show the errors to the end user (swallowing exeptions is not a good practice).&lt;br /&gt;
&lt;pre class="brush:jscript"&gt;this.ServiceError = function(error)
    {
       //this will show the error on page
// AddError method should be implimented to do so … 
        AddError(error.get_message());
    }
&lt;/pre&gt;&lt;br /&gt;
Hope this was helpful and if there is any issues or if you know a better way to impliment this please leave a comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-8756276863385911490?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/8756276863385911490/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2010/01/how-to-call-web-method-by-javascript.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8756276863385911490?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8756276863385911490?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2010/01/how-to-call-web-method-by-javascript.html" title="How to call a web method by JavaScript" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DUUAR3k4fip7ImA9Wx5WF0o.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-6623005070136604930</id><published>2009-04-22T14:09:00.001+05:30</published><updated>2010-09-29T21:50:46.736+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-29T21:50:46.736+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>JavaScript confirmation disables validation</title><content type="html">I had to do a JavaScript confirmation before I perform the post back on a web form. What I have done is just  call button.attributes.add("onClick", -- ) and added the confirmation. &lt;br /&gt;
&lt;br /&gt;
It worked fine and showed the popup and did the post back if I clicked on the OK button. But if I have implemented some validations on the fields they doesn't fire them if the validation fails. For example if there is a required field validator the post back happens even without the values for that required field. &lt;br /&gt;
&lt;br /&gt;
what I want is to do the validation and then do the post back. Luckily I've found a solution at  &lt;a href="http://forums.asp.net/t/963412.aspx?PageIndex=1"&gt;http://forums.asp.net/t/963412.aspx?PageIndex=1&lt;/a&gt; by &lt;a href="http://forums.asp.net/members/sukdeb.aspx"&gt; sukdeb&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:jscript"&gt;function Validate()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; var yes=confirm("Update this application?");
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(yes)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Page_ClientValidate();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return Page_IsValid;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
return false;

}
&lt;/pre&gt;&lt;pre class ="brush:html"&gt;&amp;lt;asp:button runat="server" text="Button" onclientclick="return Validate()"&amp;gt;
&lt;/pre&gt;Pasted from &lt;a href="http://forums.asp.net/t/963412.aspx?PageIndex=1"&gt;http://forums.asp.net/t/963412.aspx?PageIndex=1&lt;/a&gt;&lt;asp:button runat="server" text="Button" onclientclick="return Validate()"&gt;&lt;http: forums.asp.net="" t="" 963412.aspx?pageindex="1"&gt; &lt;br /&gt;
&lt;br /&gt;
It worked fine for me. I have added the script as button.attributes.add("onClick", -- ) and it works fine for me even with the "onClick" event.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-6623005070136604930?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/6623005070136604930/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2009/04/javascript-confirmation-disables.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/6623005070136604930?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/6623005070136604930?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2009/04/javascript-confirmation-disables.html" title="JavaScript confirmation disables validation" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;AkIARX8zfip7ImA9Wx5WF0o.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-3978466434545015082</id><published>2009-03-31T17:03:00.005+05:30</published><updated>2010-09-29T22:12:24.186+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-29T22:12:24.186+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft" /><title>Sort Fields which contains both Numeric and Characters</title><content type="html">It was a long time since my last post. Finally I got something to write about. Store Procedures … something I hate most of the time. But today I felt good about them because I was able to find a solution for a sorting issue.&lt;br /&gt;
The particular column contained data like “98ABC-76543-DEF-12345-GHI&lt;span style="color:red"&gt;10&lt;/span&gt;” and also “GHJ&lt;span style="color:red"&gt;23&lt;/span&gt;”. I was supposed to sort this field on Numeric value for the last part in &lt;span style="color:red"&gt;red&lt;/span&gt;. And for the other parts it should be treated as Numeric for the Numeric parts and as Strings for the others.&lt;br /&gt;
So what should I do was to split all parts and sort them separately and get numeric part in &lt;span style="color:red"&gt;red&lt;/span&gt; and sort.&lt;br /&gt;
&lt;br /&gt;
But wait a minute do we have to all the things??? I don’t think so... I have found (&lt;a href="http://nullfactory.blogspot.com/"&gt;actually one of my friends&lt;/a&gt;) an easy way to do that. Here it is.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:sql"&gt;SELECT [name],        
        RANK() OVER (ORDER BY         
                       CAST(PARSENAME(modifiedName, 5) AS  nvarchar ),   
                       CAST(PARSENAME(modifiedName, 4) AS  INT ),  
                       CAST(PARSENAME(modifiedName, 3) AS  nvarchar ),
                       CAST(PARSENAME(modifiedName, 2) AS  INT ),         
                       CAST(dbo.fFilterNumeric (PARSENAME(modifiedName, 1)) AS  INT ) 
                     ) AS sorted_name 
  FROM (SELECT [name],
               REPLACE([Name], '-', '.') AS modifiedName        
          FROM myTestTable) AS myTestTableSorted 
&lt;/pre&gt;&lt;br /&gt;
OK the next thing is to explin what I have done here.  First PARSENAME gets the string part as for the index from the end of the string. Since the PARSENAME is working only with '.' I had to replace the '-' first. Then for the last part it should be sorted as for the numeric part. For that I have found a function written by IndianScorpion  on forums.asp.net to do that. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:sql"&gt;CREATE FUNCTION [dbo].fFilterNumeric (
       @Src NVARCHAR (255)) 
       RETURNS NVARCHAR (255) 
       AS 
       BEGIN 
           declare @Res nvarchar(255) 
           declare @i int, 
           @l int, 
           @c char 
           select @i=1, 
                  @l=len(@Src) 
           SET @Res = '' 
           while @i&lt;=@l 
              begin    
                  set @c=upper(substring(@Src,@i,1))     
                  IF  isnumeric(@c)=1         
                       SET @Res = @Res + @c    
                       set @i=@i+1 
              end   
           return(@res) 
        END  
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-3978466434545015082?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/3978466434545015082/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2009/03/sort-fields-which-contains-both-numeric.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/3978466434545015082?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/3978466434545015082?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2009/03/sort-fields-which-contains-both-numeric.html" title="Sort Fields which contains both Numeric and Characters" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0AEQng7cSp7ImA9WxRVF0Q.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-3091580152957228631</id><published>2008-11-16T04:50:00.002+05:30</published><updated>2008-11-16T04:58:23.609+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-16T04:58:23.609+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><title>Show an animated gif onClientClick</title><content type="html">&lt;span xmlns=''&gt;&lt;p style='text-align: justify'&gt;To show an animated gif, something like loading onClientClick is a simple task. You just have to add a JavaScript function on the click event  so the JS function will take care until the next page loads from the server. Inside the JS function we just have to hide the excising div and show the div which contains animated loading gif.&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt; I have done it and it works fine on every other browser except IE. On IE the gif is shown but it is not animated. I have to do some R&amp;amp;D and what I found was IE doesn't do anything like that when it is loading another page (communicating with server) and was commented as a feature limitation of IE. &lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;But there should be a way to do that, that's what I was thinking and I found a pretty simple way to do that. Here it is and if you have a better way please share it here. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-size:10pt'&gt;&lt;span style='font-family:Courier New'&gt;&amp;lt;div id="divProgress" runat="server"&amp;gt;&lt;/span&gt;&lt;span style='font-family:Arial'&gt; &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family:Courier New'&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;&amp;lt;div id="Div1" runat="server"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;The web form comes here …&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;The JavaScript was like this.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-size:10pt'&gt;&lt;span style='color:blue; font-family:Courier New'&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#a31515; font-family:Courier New'&gt;script&lt;/span&gt;&lt;span style='color:black; font-family:Courier New'&gt; &lt;/span&gt;&lt;span style='color:red; font-family:Courier New'&gt;type&lt;/span&gt;&lt;span style='color:blue; font-family:Courier New'&gt;="text/javascript"&amp;gt;&lt;/span&gt;&lt;span style='color:black'&gt;&lt;span style='font-family:Arial'&gt; &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family:Courier New'&gt;&amp;lt;!--&lt;/span&gt;&lt;span style='font-family:Arial'&gt; &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family:Courier New'&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style='color:blue; font-family:Courier New'&gt;function&lt;/span&gt;&lt;span style='color:black'&gt;&lt;span style='font-family:Courier New'&gt; ShowProgress() {&lt;/span&gt;&lt;span style='font-family:Arial'&gt; &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family:Courier New'&gt;  document.getElementById(&lt;/span&gt;&lt;/span&gt;&lt;span style='color:#a31515; font-family:Courier New'&gt;'&amp;lt;%=Div1.ClientID %&amp;gt;'&lt;/span&gt;&lt;span style='color:black; font-family:Courier New'&gt;).style.display = &lt;/span&gt;&lt;span style='color:#a31515; font-family:Courier New'&gt;'none'&lt;/span&gt;&lt;span style='color:black'&gt;&lt;span style='font-family:Courier New'&gt;;       &lt;/span&gt;&lt;span style='font-family:Arial'&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family:Courier New'&gt;  document.getElementById(&lt;/span&gt;&lt;/span&gt;&lt;span style='color:#a31515; font-family:Courier New'&gt;'&amp;lt;%=divProgress.ClientID %&amp;gt;'&lt;/span&gt;&lt;span style='color:black; font-family:Courier New'&gt;).style.display = &lt;/span&gt;&lt;span style='color:#a31515; font-family:Courier New'&gt;"block"&lt;/span&gt;&lt;span style='color:black'&gt;&lt;span style='font-family:Courier New'&gt;;&lt;/span&gt;&lt;span style='font-family:Arial'&gt; &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family:Courier New'&gt;  document.getElementById(&lt;/span&gt;&lt;/span&gt;&lt;span style='color:#a31515; font-family:Courier New'&gt;'&amp;lt;%=divProgress.ClientID %&amp;gt;'&lt;/span&gt;&lt;span style='color:black; font-family:Courier New'&gt;).innerHTML = &lt;/span&gt;&lt;span style='color:#a31515; font-family:Courier New'&gt;'&amp;lt;div align="center"" class="ltGreenBorder"&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;img alt="Progress" align="top" src="/images/pleasewait.gif" /&amp;gt; &amp;lt;/div&amp;gt;'&lt;/span&gt;&lt;span style='color:black'&gt;&lt;span style='font-family:Courier New'&gt;;&lt;/span&gt;&lt;span style='font-family:Arial'&gt;&lt;br /&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-size:10pt'&gt;&lt;span style='color:black'&gt;&lt;span style='font-family:Courier New'&gt;    }&lt;/span&gt;&lt;span style='font-family:Arial'&gt; &lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='color:green; font-family:Courier New'&gt;//--&amp;gt;&lt;/span&gt;&lt;span style='color:black; font-family:Arial'&gt; &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family:Courier New'&gt;&lt;span style='color:blue'&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#a31515'&gt;script&lt;/span&gt;&lt;span style='color:blue'&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;What I have done is simply updates innerHTML for the loading div. The gif started animating magically. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;&lt;br /&gt;    &lt;/span&gt; &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-3091580152957228631?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/3091580152957228631/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/11/show-animated-gif-onclientclick.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/3091580152957228631?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/3091580152957228631?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/11/show-animated-gif-onclientclick.html" title="Show an animated gif onClientClick" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;C0AEQng7cSp7ImA9WxRVF0Q.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-5907793563510464788</id><published>2008-11-04T22:32:00.001+05:30</published><updated>2008-11-16T04:58:23.609+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-16T04:58:23.609+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><title>Disable Back &amp; RegEx Validation: JS</title><content type="html">&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face  {font-family:Wingdings;  panose-1:5 0 0 0 0 0 0 0 0 0;  mso-font-charset:2;  mso-generic-font-family:auto;  mso-font-pitch:variable;  mso-font-signature:0 268435456 0 0 -2147483648 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-parent:"";  margin:0in;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:12.0pt;  font-family:"Times New Roman";  mso-fareast-font-family:"Times New Roman";} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.25in 1.0in 1.25in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin:0in;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  font-family:"Times New Roman";  mso-ansi-language:#0400;  mso-fareast-language:#0400;  mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Disable Back on Browser: JavaScript&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I know disabling back button of a browser may cause usability issue. I have identified on some occasions we have to do it (what’s if client needs it). I have found some ways to do that but I preferred using a simple JavaScript.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Here is the code.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-parent:"";  margin:0in;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:12.0pt;  font-family:"Times New Roman";  mso-fareast-font-family:"Times New Roman";} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.25in 1.0in 1.25in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin:0in;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  font-family:"Times New Roman";  mso-ansi-language:#0400;  mso-fareast-language:#0400;  mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-parent:"";  margin:0in;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:12.0pt;  font-family:"Times New Roman";  mso-fareast-font-family:"Times New Roman";} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.25in 1.0in 1.25in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin:0in;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  font-family:"Times New Roman";  mso-ansi-language:#0400;  mso-fareast-language:#0400;  mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;lt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;script&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;lt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;!--&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;&lt;span style=""&gt;   &lt;/span&gt;window.history.forward(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:green;"   &gt;//--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;lt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;/&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;script&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;gt;&lt;/span&gt;&lt;span style="" lang="ES-CO"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&lt;/span&gt;&lt;span style="" lang="ES-CO"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&lt;/span&gt;&lt;span style="" lang="ES-CO"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;This should be put on the previous page to the page you wish to disable the back. This code will redirect user to the same page if he click back button. &lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face  {font-family:Wingdings;  panose-1:5 0 0 0 0 0 0 0 0 0;  mso-font-charset:2;  mso-generic-font-family:auto;  mso-font-pitch:variable;  mso-font-signature:0 268435456 0 0 -2147483648 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-parent:"";  margin:0in;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:12.0pt;  font-family:"Times New Roman";  mso-fareast-font-family:"Times New Roman";} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.25in 1.0in 1.25in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin:0in;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  font-family:"Times New Roman";  mso-ansi-language:#0400;  mso-fareast-language:#0400;  mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Regular expression validation on JavaScript&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I know it is very much easy to validate something on JavaScript by using Regular expressions but it is hard for me to remember the syntax to do it. I’m posting this for me to get when it is needed. &lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;J&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Here is the Code.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-parent:"";  margin:0in;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:12.0pt;  font-family:"Times New Roman";  mso-fareast-font-family:"Times New Roman";} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.25in 1.0in 1.25in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin:0in;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  font-family:"Times New Roman";  mso-ansi-language:#0400;  mso-fareast-language:#0400;  mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(163, 21, 21);"&gt;script&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;!--&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt; validateDate(source, clientside_arguments) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;clientside_arguments.IsValid = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (document.getElementById(&lt;span style="color: rgb(163, 21, 21);"&gt;'txtDate'&lt;/span&gt;).value.length == 0) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                &lt;/span&gt;clientside_arguments.IsValid = &lt;span style="color: blue;"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;else&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; dateRegEx = /^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[13-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;       &lt;/span&gt;&lt;span style=""&gt;         &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (document.getElementById(&lt;span style="color: rgb(163, 21, 21);"&gt;'txtDate'&lt;/span&gt;).value.match(dateRegEx)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                    &lt;/span&gt;clientside_arguments.IsValid = &lt;span style="color: blue;"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;span style=""&gt;    &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: green;"&gt;//--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;/&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(163, 21, 21);"&gt;script&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;color:blue;"   &gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;This regular expession (Date validation RegEx) is also very good. It simply do all the vaidations needed for dates.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;If there is something that is usefull and if you have good sites that helps on writing JavaScript Please share.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-5907793563510464788?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/5907793563510464788/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/11/disable-back-regex-validation-js.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5907793563510464788?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5907793563510464788?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/11/disable-back-regex-validation-js.html" title="Disable Back &amp; RegEx Validation: JS" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;Ck4ARH84cCp7ImA9WxRWFU8.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-7207258309160668240</id><published>2008-11-01T11:56:00.002+05:30</published><updated>2008-11-01T11:59:05.138+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-01T11:59:05.138+05:30</app:edited><title>Tips and Tricks on Blogging</title><content type="html">&lt;span xmlns=''&gt;&lt;p style='text-align: justify'&gt;Some of my friends who maintain blogs asked me what I am doing to maintain a blog. So I thought of writing a posting will be helpful than answering all the questions individually.&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;I will list down almost all the tips and tricks that I can remember so far.&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Content&lt;/strong&gt;: - When I am reading on how to make a good blog all the guys say that you should give good content (postings). How to write good content is the problem I face. What I am doing is I writing what I feel that hard to find using Google or if I found some new way or if I simply do something then I will write about that. And the main concern is to write more than 200 words on a posting otherwise Google will ignore it. &lt;a href='http://gayanonline.blogspot.com/2007/07/boost-your-blog-traffic.html'&gt;More on boost blog traffic&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Customizing the theme&lt;/strong&gt;: - A blog theme should be customized. It is like a theory. Otherwise it will look like a same ordinary blog. The user who comes to read your blog should feel that you are out of (extra) ordinary. You can easily find some good themes by just searching on Google. &lt;a href='http://gayanonline.blogspot.com/2007/05/how-make-blog-customized.html'&gt;More on Customizing Blog&lt;/a&gt; and &lt;a href='http://gayanonline.blogspot.com/2007/07/some-more-on-blogging.html'&gt;Some More&lt;/a&gt;. &lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Analytics tool&lt;/strong&gt;: - I use Google analytics and it works fine and gives me a lot of information about the visitors. It is pretty much easy to put that on your blog also. &lt;a href='http://gayanonline.blogspot.com/2007/07/google-analytics_04.html'&gt;More on Google analytics&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Google &lt;span style='color:black; font-family:Trebuchet MS; font-size:10pt'&gt;adsense&lt;/span&gt;&lt;/strong&gt;:-I'm not that good on making money online. But I have added the adsense. Anyway I have earned about 150$s so far.  What you have to do is just make the background, Text and Links same as the other parts on your blog. &lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Make Labels&lt;/strong&gt;:-Categorizing the postings is a good thing. Still I am finding a good way to do that. It makes easy to maintain the posting and to identify on what you should write more. I think I have to make new set of categories and sort all my postings. So far I have 90 posting published on this blog.&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Write More about Google&lt;/strong&gt;:-I don't know why but I just browse through my blog posting and found that I write most of the postings about Google. I have no idea why I am doing it. I think I have to write about JavaScript more because the functions and syntax on JavaScript is hard to find and hard to remember (for me). &lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Subscription&lt;/strong&gt;:-Make it easier to subscribe to your blog. I believe the visitors who want to subscribe are most valuable visitors because they will come back again. &lt;a href='http://gayanonline.blogspot.com/2007/07/enter-your-e-mail-address.html'&gt;Make a Subscription available&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Networks&lt;/strong&gt;:-Registering the blog on networks   is a good thing to make sure your blog is reachable. In the left side panel of this blog you can see a lot of links to those sites and if you need them please use them.&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Google webmaster&lt;/strong&gt;: - About 85% of the visitors are coming via Google search to my blog. The best thing to make it listed on Google is to use &lt;a href='http://www.google.com/webmasters/'&gt;Google Webmaster&lt;/a&gt;. It will make easier to control how to be paged and also you can give the site map to it. It was hard to find a way for me to get a sitemap for my blog and finally I've found what we (bloggers) have to do is submit the &lt;a href='http://feeds.feedburner.com/InspirationOfCuttingedgeTechnology'&gt;RSS feed URL&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;&lt;strong&gt;Add Some cool features&lt;/strong&gt;:-Adding some really cool gadgets make you feel good. What I am doing is testing a lot of them and if I feel it is worth then it will be there appearing on my blog. As you can see I have added a gadget (on right top corner) to direct chat with me.  &lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I think I have listed all the things I am doing on this blog. Please if you have more information or any good blog please share it with me. &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-7207258309160668240?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/7207258309160668240/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/11/tips-and-tricks-on-blogging.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/7207258309160668240?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/7207258309160668240?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/11/tips-and-tricks-on-blogging.html" title="Tips and Tricks on Blogging" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CU4GRX49fSp7ImA9WxRWEU4.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-5939328420511771278</id><published>2008-10-28T00:14:00.000+05:30</published><updated>2008-10-28T00:28:44.065+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-28T00:28:44.065+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>What I visit most of the time</title><content type="html">&lt;p style="text-align: justify;" class="MsoNormal"&gt;I was just thinking about what are the sites I’m visiting most of the time. So I thought to write something about them. I think a person can be understood better by the sites he is reading and visiting most of the time. So I think you can know more about me when I share my favorite list.&lt;/p&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;ol style="margin-top: 0in; text-align: justify;" start="1" type="1"&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://google.com/"&gt;Google&lt;/a&gt;: The best search engine I have ever      used. It helps me a lot on finding almost anything. It helps me a lot. I      don’t have to talk about this because anybody who reads this blog knows      about Google.&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://mail.yahoo.com/"&gt;Yahoo mail&lt;/a&gt;: Yahoo mail is the mail I am      using. There are 2 reasons for that. First it is free. Second no storage      limit. &lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://www.facebook.com/"&gt;FaceBook&lt;/a&gt;: Most of the time what I am      doing in here is accepting friends and looking at the photos posted by      friends. (normally I visit almost all the photos of the friends)&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://defencewire.blogspot.com/"&gt;DefenceWire&lt;/a&gt; (blog): This is a      blog which posts about the current status of the war in &lt;st1:country-region st="on"&gt;&lt;st1:place st="on"&gt;Sri Lanka&lt;/st1:place&gt;&lt;/st1:country-region&gt;.      There are a lot of comments so the time is spent more on reading comments      than reading the postings. (these days it is not updating regularly – but comments      are coming)&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://defencenet.blogspot.com/"&gt;DefenceNet&lt;/a&gt; (blog): This is      almost same as DefenceWire but I prefer on reading both blogs since the      comment threads goes on many viewpoints.&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://defence.lk/"&gt;Defence&lt;/a&gt; : This is the web site which was      maintained by Ministry of Defense &lt;st1:place st="on"&gt;&lt;st1:country-region st="on"&gt;Sri Lanka&lt;/st1:country-region&gt;&lt;/st1:place&gt;. Worth reading to      know about what the government thinks about the war.&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://www.msdn.com/"&gt;MSDN&lt;/a&gt;: Since I am a .net developer I have      to read about the things to learn and also to implement on .net. I don’t use      the search on MSDN (it gives a lot of other things than what I want to      know) instead use Google to search on MSDN site.&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://youtube.com/"&gt;YouTube&lt;/a&gt;: There is lot of things to watch in      here since anybody can upload videos on YouTube. &lt;span style=""&gt; &lt;/span&gt;I just have to search what I like to      watch and most of the time it’s available on here.&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://www.google.com/analytics/sign_up.html"&gt;Google Analytics&lt;/a&gt;: I’m      using Google analytics to monitor how this blog goes on. it gives me a lot      of features and I can get an idea on how to improve the blog and what      should I do to increase the visitors. &lt;a href="http://gayanonline.blogspot.com/2007/07/google-analytics_04.html"&gt;More      on Google Analytics …&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;a href="http://www.engadget.com/"&gt;Engadget&lt;/a&gt;: I love to read about the new      gadgets coming. So I think I have found the best site to read about them. &lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt; &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;I like to know about the sites you visit most of the time. I think it will help to understand each other.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-5939328420511771278?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/5939328420511771278/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/10/what-i-visit-most-of-time.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5939328420511771278?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5939328420511771278?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/10/what-i-visit-most-of-time.html" title="What I visit most of the time" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>5</thr:total></entry><entry gd:etag="W/&quot;CU4FR38_fSp7ImA9WxRWEU4.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-8058101124399853708</id><published>2008-10-26T12:52:00.003+05:30</published><updated>2008-10-28T00:28:36.145+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-28T00:28:36.145+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft" /><title>User Controls vs. Custom Controls</title><content type="html">&lt;span xmlns=""&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNoSpacing"&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;The first thing I have to do in here is to apologise for not posting something on this blog for a long time. Yes it was really a long time without any posting. There were some reasons for that like I had to go abroad (still I am at Canada, and it is a big experience). So I was new in here had lot of work to do. Anyway I hope to post regularly now onwards. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;I have been on 2 projects in here (web applications). On one project it was designed to do by using more “User Controls” and the other one was using “Custom Controls” so first of all I was pretty confused with mixing these two approaches. In my mind I was like in a war to identify what is the better approach and thought to write about those a little.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNoSpacing"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNoSpacing"&gt;&lt;span class="apple-style-span"&gt;&lt;b&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;User Controls &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;Basically a User Control is like a normal &lt;/span&gt;&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#4F6228; mso-thememso-themeshade:128font-family:&amp;quot;;font-size:10.0pt;color:accent3;"&gt;aspx&lt;/span&gt;&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt; page only different I can see is the file extension is as &lt;/span&gt;&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#4F6228; mso-thememso-themeshade:128font-family:&amp;quot;;font-size:10.0pt;color:accent3;"&gt;ascx&lt;/span&gt;&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;. We can make a user control and it has a code behind also. We can just build this as a web page and treat it as a normal web page on aspx. So we can have properties and methods on the code behind and can have all the controls as on aspx and HTML. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;User Controls can be built as a reusable thing for a project and we can insert on several places on a particular project. For example we can build a Form or some contents with styles. Since we can dynamically assign the properties it can used on many places and helps maintains the uniformity. So when an aspx page is built then it will be a collection of user controls and an assignment of properties for them. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US"    style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:black;"&gt;User controls were developed even though it is used only on one place. They were maintained as user controls because we can use them when a change or an enhancement is needed. The other thing is we can just publish the user controls on MOSS. Since the project I was on which had user controls were published on MOSS so we haven`t done any aspx page and all the user controls were either directly published on MOSS or used by another User Control. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;In this URL below you can find more I mean more on how to develop a user control. To understand when and where to use them it is needed to do some hands on experiments.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNoSpacing"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb386451.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb386451.aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNoSpacing"&gt;&lt;/p&gt;&lt;p class="MsoNoSpacing"&gt;&lt;b&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;Custom Controls &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;A custom control is basically a class. It derives from Control or WebControl.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;So what we are doing is making some control that is reusable on any project. &lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;What usually made are customized Data grids (like editable grids), Date Time pickups, and textbox with AJAX suggestions. Since these are Classes we can use the dlls on anywhere. (Even on another project easily) &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;It can either be inserted on an aspx page directly or on a User Control. What I am thinking is making a lot of complex Custom controls that only can be used on one project is not worthy unless we are reusing it more and more (on same project). And it will be better we can make more generic Custom Controls that enhances the functionality of aspx controls. (It is what happens on most software companies) &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;You can find on how to develop a new custom control and insert it on an aspx (or ascx) by visiting the link below. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/zt27tfhy.aspx"&gt;http://msdn.microsoft.com/en-us/library/zt27tfhy.aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNoSpacing"&gt;&lt;/p&gt;&lt;p class="MsoNoSpacing"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;On the other project we were using the custom controls and they were just put on the aspx pages. The custom controls we were built was a bit complex ones (and used once inside the project and specialized for the same project). &lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;So there were about 2-3 custom controls per page. &lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;I think it will be better if we are using both control types on a web application and the custom controls should be compatible with other projects and user controls may be more specified for a particular project. &lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNoSpacing"&gt;&lt;span lang="EN-US"   style="Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"&gt;I know that I don`t have a lot of experience on these so if there is some more information or something need to be changed please let me know.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-8058101124399853708?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/8058101124399853708/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/10/user-controls-vs-custom-controls_26.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8058101124399853708?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8058101124399853708?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/10/user-controls-vs-custom-controls_26.html" title="User Controls vs. Custom Controls" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;A0AGQH08eip7ImA9WxdVEUU.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-3026075362128510736</id><published>2008-07-16T11:55:00.002+05:30</published><updated>2008-07-16T11:58:41.372+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-16T11:58:41.372+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>How to use Google</title><content type="html">&lt;span xmlns=''&gt;&lt;p&gt;I have seen a lot of my friends are using Google to find out the things. But I felt sometimes that they are not using the proper way to do that. So it takes a lot more time and lot more reading to find actually what we want.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So I thought to find how to make our search better. I have found 2 sites that tell about that in more detailed.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;First is &lt;a href='http://www.google.com/support/bin/static.py?page=searchguides.html&amp;amp;ctx=basics&amp;amp;hl=en'&gt;Google Search Help Center&lt;/a&gt; . It talks about the keywords that we can use with Google. I thing spending some time on this site will save a lot of time.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Next is &lt;a href='http://www.googleguide.com/'&gt;Google Guide&lt;/a&gt;. It tells you a lot more on search. Whether you are an expert or novice it doesn't matter on this site. I think even an expert can learn something in here.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So I hope after referring these sites your ability on searching on Google will increase. And you will learn what Google can do. (It is lot more than just a search engine)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-3026075362128510736?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/3026075362128510736/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/07/how-to-use-google.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/3026075362128510736?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/3026075362128510736?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/07/how-to-use-google.html" title="How to use Google" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;A0AHQH46fCp7ImA9WxdVEUU.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-7269656936508942097</id><published>2008-05-21T17:49:00.003+05:30</published><updated>2008-07-16T11:58:51.014+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-16T11:58:51.014+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>How to get indexed by Google &amp; Yahoo</title><content type="html">&lt;span xmlns=""&gt;&lt;p&gt;I have seen a lot of ads and services online that provide the facility to get higher page ranks on search engines. But when I asked about those services on Google their respond was not much positive because they said it can decrease you page rank (because those services cannot be trusted always). It is happening because the page rank is depending on page visitors (as Google say). So the better way is to let the Google to index your site by sending them the address of your website. &lt;a href="http://www.google.com/webmasters/"&gt;http://www.google.com/webmasters/&lt;/a&gt;  : here you can improve the traffic with the webmaster tools and you can send your website contents also. It is a legal, simple and direct hit.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can send your web site address (even the blog) to Yahoo: &lt;a href="https://siteexplorer.search.yahoo.com/"&gt;https://siteexplorer.search.yahoo.com&lt;/a&gt; also. It helps them to index your pages on their search engines.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2152/2510510689_14998e216c.jpg" width="300"&gt;&lt;br /&gt;&lt;p&gt;It is better to come up with the content and services which are really useful for the visitors and the traffic will be increased regularly. I have gone through a lot of experiments on increasing my blog traffic and at last I thought to write about the things that are useful for the visitors and then the rest will be done.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I think this way will be slower but much safer and strong than letting other services to do it quickly. And at last these services are free.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-7269656936508942097?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/7269656936508942097/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/05/how-to-get-indexed-by-google-yahoo.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/7269656936508942097?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/7269656936508942097?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/05/how-to-get-indexed-by-google-yahoo.html" title="How to get indexed by Google &amp;amp; Yahoo" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2152/2510510689_14998e216c_t.jpg" height="72" width="72" /><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;A0AHSXo6fCp7ImA9WxdVEUU.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-1571022219545723523</id><published>2008-05-21T17:03:00.002+05:30</published><updated>2008-07-16T11:58:58.414+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-16T11:58:58.414+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>Online photo editing tool</title><content type="html">&lt;span xmlns=""&gt;&lt;p&gt;There are plenty of tools for editing photos and a lot more which we can do the same online. I think among the desktop tools "Adobe Photoshop" is a good on image editing. I have found a site that I felt it is similar to Photoshop but online (seems it is using flash). And it allows us to get the images from websites and local machine to edit and to save on local machine or on image sharing services (like flickr).&lt;/p&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2154/2510453231_ff7ce8c03c.jpg"&gt;&lt;br /&gt;&lt;p&gt;I have shown a screen shot of that web site and here is the URL of it. &lt;a href="http://www.splashup.com/"&gt;http://www.splashup.com&lt;/a&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p&gt;I think this is a good tool for using when we do not have installed Photoshop on our machine. If you have known any better tools online please do share it.&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-1571022219545723523?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/1571022219545723523/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/05/online-photo-editing-tool.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/1571022219545723523?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/1571022219545723523?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/05/online-photo-editing-tool.html" title="Online photo editing tool" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2154/2510453231_ff7ce8c03c_t.jpg" height="72" width="72" /><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;C0EDRn4-fyp7ImA9WxdTFEw.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-2147609123303923743</id><published>2008-05-10T14:52:00.002+05:30</published><updated>2008-05-10T14:57:57.057+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-10T14:57:57.057+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>FlashGet – a free Download Manager</title><content type="html">&lt;p&gt;I have used so many download accelerators and download managers but this is the first time I have found a good download manager for &lt;span style='color:#76923c'&gt;free (so no need to find the cracks)&lt;/span&gt;.  Currently I am using it for downloads and so far it seems good and here I have listed the features of the FlashGet. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;img src="http://farm2.static.flickr.com/1370/1431873361_d690f0e0a6_m.jpg" alt="" /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Optimized - will run with low system resources.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Call anti-virus - It will execute the antivirus software after downloading a file.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;100% clean - there are no ads were displayed on FlashGet so full strength will be used for download.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Speed - They say it is speed but it depends on your connection&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Multi-protocol – supports HTTP and FTP&lt;br /&gt;&lt;/li&gt;&lt;li&gt;File management – it does the categorization&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Add-ons and Themes  are also available&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;You can download FlashGet by just &lt;a href='http://www.flashget.com/en/download.htm'&gt;click here&lt;/a&gt;. If you are already using FlashGet and have better experience or if there are any drawbacks please share it with us. Or if there are a better Download Manager please share it also.&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-2147609123303923743?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/2147609123303923743/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/05/flashget-free-download-manager.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/2147609123303923743?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/2147609123303923743?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/05/flashget-free-download-manager.html" title="FlashGet – a free Download Manager" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm2.static.flickr.com/1370/1431873361_d690f0e0a6_t.jpg" height="72" width="72" /><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;AkQARXs6eyp7ImA9Wx9QE0s.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-5807273455354976569</id><published>2008-05-07T14:00:00.004+05:30</published><updated>2010-12-26T18:29:04.513+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-26T18:29:04.513+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>Working with forms inside iframes</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm3.static.flickr.com/2250/2472534075_a8c8b5efe7_m.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://farm3.static.flickr.com/2250/2472534075_a8c8b5efe7_m.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;I was requested to do some work with forms using the iframes on a web page and it was needed to do a lot of Googling and thought to share those things.&lt;/p&gt;&lt;br /&gt;
1. Display a form on the main page and when the form is submitted the results should be shown on an iframe on the same page.&lt;br /&gt;
 a. This task was pretty simple and what I had to do is give the same page as the action page of the form.&lt;br /&gt;
 b. If the form data is defined on the page I had to show the iframe.When showing the iframe I had to give all the form data as query parameters on the URL of the iframe.&lt;br /&gt;
&lt;pre class="brush:html"&gt;&lt;iframe id="ifComment" name="ifComment"
 src="test.cfm?&amp;StartDate=#URLEncodedFormat(form.StartDate)#
 &amp;EndDate=#URLEncodedFormat(form.EndDate)#"
 width="730"
 height="600"&gt;
&lt;/iframe&gt;
&lt;/pre&gt; c. Then the resulting page was displayed correctly inside the iframe.&lt;br /&gt;
2. Then the resulting page which was inside the iframe was also a web form and it has to be submitted on the event of a button click which was on the main page.&lt;br /&gt;
 a. For the button click event we have to fire a JavaScript function.&lt;br /&gt;
&lt;pre class="brush:html"&gt;&lt;input type="image" src="Images/btnSaveChanges.jpg" onclick="updateStatusAction()"&gt;
&lt;/pre&gt; b. On that JavaScript function we can do the submission as follows.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt; &lt;script language="javascript"&gt;
 function updateStatusAction ()
 {
  var ifrDoc=document.getElementById('ifComment').contentWindow.document;
   ifrDoc.forms[0].submit();
 }
 &lt;/script&gt;
&lt;/pre&gt; c. This will be doing the submission and we have to redirect the resulting page to the same one.&lt;br /&gt;
 3. When showing the resulting page inside the iframe we have to update the resulting values according to the values on the main page.&lt;br /&gt;
  a. For that we have to submit the form again when we are showing the resulting page.&lt;br /&gt;
  b. So we have to send a query parameter and if the query parameter is true then we have to do the main page form submission.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&lt;script language="javascript"&gt;
parent.document.getElementById(‘formId’).submit();
&lt;/script&gt;
&lt;/pre&gt;4. If we need o call a JavaScript function on main page on an event of something whch was palced inside the iframe we can call like,&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;onclick = “return parent.functionName(parameter)”
&lt;/pre&gt;Hope this may help you when working with iframes and if there are better ways to do this or if something goes wrong (nobody is perfect) please do share it with me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-5807273455354976569?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/5807273455354976569/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/05/working-with-forms-inside-iframes.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5807273455354976569?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5807273455354976569?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/05/working-with-forms-inside-iframes.html" title="Working with forms inside iframes" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2250/2472534075_a8c8b5efe7_t.jpg" height="72" width="72" /><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CkQCQXczfSp7ImA9WxdTEUg.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-8821917550090630455</id><published>2008-04-28T12:01:00.002+05:30</published><updated>2008-05-07T14:22:40.985+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-07T14:22:40.985+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>Future features in Blogger</title><content type="html">&lt;span xmlns=''&gt;&lt;p&gt;The &lt;a href='http://draft.blogger.com'&gt;draft.blogger.com&lt;/a&gt;  is seems like the beta version of new features of &lt;a href='http://blogger.com'&gt;blogger.com&lt;/a&gt;. And we can try the "to be added" gadgets and features of blogger on "draft". And I think it is a good thing for both of us.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can visit their blog on &lt;a href='http://bloggerindraft.blogspot.com'&gt;bloggerindraft.blogspot.com&lt;/a&gt;  and try the future features of blogger. I have tried some of them and they are really good.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2088/2448551432_0fdfee879c.jpg"&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://bloggerindraft.blogspot.com/2008/02/new-feature-blog-list.html'&gt;&lt;strong&gt;Blog List&lt;/strong&gt;&lt;/a&gt; - a blogroll to your blog's sidebar&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://bloggerindraft.blogspot.com/2008/02/new-feature-scheduled-posts.html'&gt;&lt;strong&gt;Scheduled Post Publishing&lt;/strong&gt;&lt;/a&gt; - schedule the post to appear on your blog&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://bloggerindraft.blogspot.com/search/label/feed%20subscription'&gt;&lt;strong&gt;Feed Subscription&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;br /&gt;     &lt;/strong&gt;- Help your readers subscribe&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://bloggerindraft.blogspot.com/search/label/searchbox'&gt;&lt;strong&gt;Search Box&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; - &lt;/strong&gt;Search over your blog and more&lt;strong&gt;&lt;br /&gt;     &lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The last feature in here the Search box is the best thing I have experienced among the others. It is a AJAX control and works really good and I hope you all (the bloggers) will love to try them up.&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-8821917550090630455?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/8821917550090630455/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/04/future-features-in-blogger.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8821917550090630455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8821917550090630455?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/04/future-features-in-blogger.html" title="Future features in Blogger" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2088/2448551432_0fdfee879c_t.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0INRXcyfip7ImA9WxZaE0s.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-2152215312018344268</id><published>2008-04-28T11:11:00.003+05:30</published><updated>2008-04-28T11:16:34.996+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-28T11:16:34.996+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>I signed up for PPP!</title><content type="html">&lt;span xmlns=''&gt;&lt;p&gt;I signed up for a site called PPP (pay per post) and seem they are really nice for bloggers to earn money. The basic thing in here is we have to write on something (which they say) and they are ready to pay for your post.&lt;br /&gt;&lt;img src="http://tinyurl.com/4d6u2p" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It is pretty easy to sign up on them. Please follow the link here.&lt;a href="http://posties.payperpost.com/"&gt;payperpost&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And start on earning money for the postings. On PPP you have to have a PayPal account to get the money.  The main benefit behind PPP is you can add tools for your blog as follows,&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Referral program (redirect more to PPP)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Review my post (put on your post and earn more)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Firefox plug-in (finds more opportunities for you)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Signup forms (it is a referral form that can be put on your blog )&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PPP Direct (enables advertisers to hire you directly)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;There are some conditions apply on approval of your blog. I have tried with some blogs that I have (but not maintained properly) and they have rejected it. So it seems you have try with a good blog (updates properly) on Pay Per Post.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The good thing is you can start referring and installing PPP tools on your blog even before they approve your blog and seems you can start earning money from the day you are sign-up on PPP.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-2152215312018344268?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/2152215312018344268/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/04/i-signed-up-for-ppp.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/2152215312018344268?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/2152215312018344268?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/04/i-signed-up-for-ppp.html" title="I signed up for PPP!" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;C0AEQng6eCp7ImA9WxRVF0Q.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-8950481302641273958</id><published>2008-04-23T16:27:00.000+05:30</published><updated>2008-11-16T04:58:23.610+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-16T04:58:23.610+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>Replace new line with &lt;br&gt; tag</title><content type="html">&lt;span xmlns=''&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;Most of the multi line text areas we are using the user can input text by using line breaks. If that text used for internal purpose saving it as a single string may not be a problem.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;But what's if we have to show that on a web page (forums, user comments, etc). We have to replace the new line character with the &amp;lt;br&amp;gt; tag. The famous way is to replace chr(13) with the &amp;lt;br&amp;gt; tag by using the Java Script. But the problem is this method is not working fine with every platform. But I have found a way to come up with and thought to share it with you.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:blue'&gt;function&lt;/span&gt;&lt;span style='color:black'&gt; escapeVal(textarea,replaceWith)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;  textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value &lt;/span&gt;&lt;span style='color:blue'&gt;=&lt;/span&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:#0099ff'&gt;escape&lt;/span&gt;&lt;span style='color:black'&gt;(textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;        &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:blue'&gt;  for&lt;/span&gt;&lt;span style='color:black'&gt;(i&lt;/span&gt;&lt;span style='color:blue'&gt;=&lt;/span&gt;&lt;span style='color:#ff0a0a'&gt;0&lt;/span&gt;&lt;span style='color:black'&gt;; i&lt;/span&gt;&lt;span style='color:blue'&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:black'&gt;textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;length; i&lt;/span&gt;&lt;span style='color:blue'&gt;++&lt;/span&gt;&lt;span style='color:black'&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;   {&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:blue'&gt;if&lt;/span&gt;&lt;span style='color:black'&gt;(textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;indexOf(&lt;/span&gt;&lt;span style='color:#006600'&gt;"%0D%0A"&lt;/span&gt;&lt;span style='color:black'&gt;) &lt;/span&gt;&lt;span style='color:blue'&gt;&amp;gt;&lt;/span&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:blue'&gt;-&lt;/span&gt;&lt;span style='color:#ff0a0a'&gt;1&lt;/span&gt;&lt;span style='color:black'&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;     {&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;    textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;=&lt;/span&gt;&lt;span style='color:black'&gt;textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;replace(&lt;/span&gt;&lt;span style='color:#006600'&gt;"%0D%0A"&lt;/span&gt;&lt;span style='color:black'&gt;,replaceWith)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;     }&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:blue'&gt;else&lt;/span&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:blue'&gt;if&lt;/span&gt;&lt;span style='color:black'&gt;(textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;indexOf(&lt;/span&gt;&lt;span style='color:#006600'&gt;"%0A"&lt;/span&gt;&lt;span style='color:black'&gt;) &lt;/span&gt;&lt;span style='color:blue'&gt;&amp;gt;&lt;/span&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:blue'&gt;-&lt;/span&gt;&lt;span style='color:#ff0a0a'&gt;1&lt;/span&gt;&lt;span style='color:black'&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;     {&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;    textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;=&lt;/span&gt;&lt;span style='color:black'&gt;textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;replace(&lt;/span&gt;&lt;span style='color:#006600'&gt;"%0A"&lt;/span&gt;&lt;span style='color:black'&gt;,replaceWith)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;     }&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:blue'&gt;else&lt;/span&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:blue'&gt;if&lt;/span&gt;&lt;span style='color:black'&gt;(textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;indexOf(&lt;/span&gt;&lt;span style='color:#006600'&gt;"%0D"&lt;/span&gt;&lt;span style='color:black'&gt;) &lt;/span&gt;&lt;span style='color:blue'&gt;&amp;gt;&lt;/span&gt;&lt;span style='color:black'&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style='color:blue'&gt;-&lt;/span&gt;&lt;span style='color:#ff0a0a'&gt;1&lt;/span&gt;&lt;span style='color:black'&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;     {&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;    textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;=&lt;/span&gt;&lt;span style='color:black'&gt;textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;replace(&lt;/span&gt;&lt;span style='color:#006600'&gt;"%0D"&lt;/span&gt;&lt;span style='color:black'&gt;,replaceWith)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;   textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value &lt;/span&gt;&lt;span style='color:blue'&gt;= &lt;/span&gt;&lt;span style='color:#0099ff'&gt;unescape&lt;/span&gt;&lt;span style='color:black'&gt;(textarea&lt;/span&gt;&lt;span style='color:blue'&gt;.&lt;/span&gt;&lt;span style='color:black'&gt;value)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;I have tested this on the Linux and windows with both Firefox and IE 7; and it worked fine.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Then the next step, sometimes we may need to convert &amp;lt;br&amp;gt; tags back to new line characters (e.g.: user tries to edit the content).  On that occasion we cannot show the &amp;lt;br&amp;gt; tags. But for this we do not have to use the javascript, we can do this on the server side.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;Replace(Comment.CommentValue,"&amp;lt;br&amp;gt;",chr(13),"all")&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;I have done this by the ColdFusion and replacing it with chr(13) works fine.&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-8950481302641273958?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/8950481302641273958/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/04/replace-new-line-with-tag.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8950481302641273958?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/8950481302641273958?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/04/replace-new-line-with-tag.html" title="Replace new line with &amp;lt;br&amp;gt; tag" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DEQEQnkzeCp7ImA9WxZbGEg.&quot;"><id>tag:blogger.com,1999:blog-5400517399212235427.post-5609842609303254237</id><published>2008-04-22T20:03:00.000+05:30</published><updated>2008-04-22T14:55:03.780+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-22T14:55:03.780+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><category scheme="http://www.blogger.com/atom/ns#" term="Internet" /><title>Good bye Netscape Navigator!!!</title><content type="html">&lt;span xmlns=""&gt;&lt;p&gt;I have seen "&lt;span style="color: rgb(118, 146, 60);"&gt;Official support for all Netscape client products ended on March 1st, 2008. Please see the &lt;a href="http://blog.netscape.com/2007/12/28/end-of-support-for-netscape-web-browsers/"&gt;announcement&lt;/a&gt; for more details.&lt;/span&gt;" on top of the Netscape browser website.  On their announcement they say to download the Mozilla Firefox web browser and seem they support on it.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2087/2427479240_d125b47cd6.jpg" /&gt;&lt;br /&gt;&lt;p&gt;I think the main reason behind this is huge drop of popularity on their browser. But anyway if you are interested on the Netscape Communications Corporation (now under AOL) and their activities and the history just click on the links below.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://browser.netscape.com/"&gt;browser.netscape.com&lt;/a&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p&gt;&lt;a href="http://netscape.aol.com/"&gt;netscape.aol.com&lt;/a&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Netscape_%28web_browser%29"&gt;wikipedia.org/wiki/Netscape (web browser)&lt;/a&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Netscape_Communications_Corporation"&gt;wikipedia.org/wiki/Netscape Communications Corporation&lt;/a&gt;&lt;br /&gt;   &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5400517399212235427-5609842609303254237?l=gayanonline.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gayanonline.blogspot.com/feeds/5609842609303254237/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://gayanonline.blogspot.com/2008/04/good-bye-netscape-navigator.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5609842609303254237?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5400517399212235427/posts/default/5609842609303254237?v=2" /><link rel="alternate" type="text/html" href="http://gayanonline.blogspot.com/2008/04/good-bye-netscape-navigator.html" title="Good bye Netscape Navigator!!!" /><author><name>Gayan Balasooriya</name><uri>https://profiles.google.com/107677760167882781549</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-87aD3iyQC68/AAAAAAAAAAI/AAAAAAAAAAA/-97IEOsW1i8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2087/2427479240_d125b47cd6_t.jpg" height="72" width="72" /><thr:total>0</thr:total></entry></feed>

