Posts

Showing posts from January, 2012

JavaScript Tooltip

Tooltip In JavaScript....! Hello readers this code helps you to set tooltip in any element to show some text in a popup. Although there is a feature supported by all the browsers to show tooltip by adding title attribute, but limitation is that you cannot use line breaks or background or foreground colors for title attribute. Below is the simple code to create tooltips using javascript. All you have to do is, just copy and paste the code and run. Code is Browser compatible. <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml"> < head >     < title > Tooltip In Javascript </ title >     < script type ="text/javascript" language ="javascript">         function showhideTooltip(opt, ctrl)         {             var tooltip = document.createElement( 'div' );             if

File Upload

Image
Below is the simple code to upload file to server. First create a folder with name ' UploadedImages'. ASPX Code ---------------------------------------------------------------------------------------------- <% @ Page Language ="C#" AutoEventWireup ="true"   CodeFile ="Default.aspx.cs" Inherits ="_Default" %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server">     < title > File Uploader </ title > </ head > < body >     < form id ="form1" runat ="server">     < div >         < asp : Label ID ="lblImage" runat ="server" Text ="Image"></ asp : Label >         < asp : FileUpload ID ="flupdImage" runat ="