Thursday, February 24, 2011

Search box with hiding text



While surfing through many blogging resource websites I found many tutorials that explained how to create a search box with default text inside the input but that text didn’t hid itself whenever the input was clicked for typing.
But recently I came across the website of one of our reader’s jdsans which had this tutorial to create a search option with text hiding capability on clicking. The widget works perfect in HTML/JavaScript widget option but it doesn’t work in the template code area. But I removed that bug so this widget is perfect to work on both the places.
Unfortunately there are two different codes for both the above purposes.
1. If you want to install the search box in HTML/JavaScript widget use this code
<form id="searchThis" action="/search" style="display:inline;" method="get"> 
<input id="searchBox" name="q" size="20" type="text" value="Search This Blog...." onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"/> <input id="searchButton" value="Search" type="submit"/> 
</form>
2. If you want to use the search box in the template code use this one:-
<form id="searchThis" action="/search" style="display:inline;" method="get"> 
&lt;input id=&quot;searchBox&quot; name=&quot;q&quot; size=&quot;20&quot; type=&quot;text&quot; value=&quot;Search This Blog....&quot; onfocus=&quot;if(this.value==this.defaultValue)this.value=&#039;&#039;;&quot; onblur=&quot;if(this.value==&#039;&#039;)this.value=this.defaultValue;&quot;/&gt;
<input id="searchButton" value="Search" type="submit"/> 
</form>
In both the codes above 20 represents the box size and “Search this Blog…” represents the default text that will be seen in the input area. You can change both these values as you like.


Sunday, February 20, 2011

To Celebrate The Jan25 Revolution, Egyptian Names His Firstborn “Facebook”


Cultural relativity is an amazing thing. While American parents worry about their kids being on Facebook, Egyptian parents are naming their kids “Facebook” to commemorate the events surrounding the #Jan25 revolution.

According to Al-Ahram (one of the most popular newspapers in Egypt) a man in his twenties has named his first born daughter “Facebook” in tribute to the role the social media service played in organizing the protests in Tahrir Square and beyond.




Translation: 
A New Day
Man Names His Newborn Girl Facebook
A young man in his twenties wanted to express his gratitude about the victories the youth of 25th of January have achieved and chose to express it in the form of naming his firstborn girl “Facebook” Jamal Ibrahim (his name.) The girl’s family, friends, and neighbors in the Ibrahimya region gathered around the new born to express their continuing support for the revolution that started on Facebook. “Facebook” received many gifts from the youth who were overjoyed by her arrival and the new name. A name [Facebook] that shocked the entire world.

enjoyyyyyyyyyyyyyyyyy................