Search This Blog

Wednesday, February 25, 2009

How to find various type of co-ordinate in a Web Browser

Find[Set]  x and y Co-ordinate,
#javascript code

Scroll Postion
   var VScrollPos=  document.body.scrollTop;//vertically
   var HScrollPos=  document.body.scrollLeft;//horizontally
Browser width and height
    var wdth=  window.screen.width;
    var hght=  window.screen.height;
Mouse Postion
    var ev=window.event;
    var x=ev.clientX;
    var y=ev.clientY;
Body width and height
     var bHght= document.body.clientHeight;
     var bWdth= document.body.clientWidth;
Set Scroll at stating position
    window.scrollTo(0,0);
 


Wednesday, February 18, 2009

Send Free SMS

How to open a new url in same browser window

if you wish to open a new url in same browser window  ,then use the below javascript or C# code;
javascript:--
window.location.href="http://www.rakesh.com/upload/resume.aspx";
...........................................................................................................................
C#:-
Response.Redirect("http://www.rakesh.com/upload/resume.aspx");
.........................................................................................................................

Tuesday, February 17, 2009

How do you make Two Columns under a one Column for Excel?

In your header row, select cells A1 to B1, right-click, click format cells, click merge cells. That gives you one column heading with two columns beneath it and same for row select A1 to A2 or A3, right click,click merge cells and click on ok.

Friday, February 13, 2009

Difference between dates in terms of date,month and year

function GetdateDiff()
{
var dt1= document.getElementById('txtdate1').value;
var dt2= document.getElementById('txtdate2').value;
var delimeter ='/';
var data1=dt1.split(delimeter);
var data2=dt2.split(delimeter);
var Tdat=data1[0]-0;
var TMonth=data1[1]-0;
var TYear=data1[2]-0;
var Odat= data2[0]-0;
var OMonth=data2[1]-0;
var OYear= data2[2]-0;
if(TYear > OYear)
{
this.Calculate(Tdat,TMonth,TYear,Odat,OMonth,OYear)
}
else if(TYear == OYear)
{

if(TMonth > OMonth)
{

              this.Calculate(Tdat,TMonth,TYear,Odat,OMonth,OYear)
}
else if(TMonth == OMonth)
{
if(Tdat >Odat)
{
 this.Calculate(Tdat,TMonth,TYear,Odat,OMonth,OYear)
}
else
{
 this.Calculate(Odat,OMonth,OYear,Tdat,TMonth,TYear)
}
}
else
{
 this.Calculate(Odat,OMonth,OYear,Tdat,TMonth,TYear)
}
}
else
{
this.Calculate(Odat,OMonth,OYear,Tdat,TMonth,TYear);
}

}
function Calculate(Tdat,TMonth,TYear,Odat,OMonth,OYear)
{
var M311="1,3,5,7,8,10,12";
var M300="4,6,9,11";
var M31=M311.split(',');
var M30 =M300.split(',');
var Fdate;
var Fmonth;
var Fyear;
if(Tdat >= Odat)
{
Fdate = Tdat - Odat;
}
else
{
for(i=0 ; i<>
{
if( TMonth ==M31[i])
{
Tdat = Tdat + 31;
break;
}
}
for(i=0; i<>
{
if( TMonth ==M30[i])
{
Tdat = Tdat + 30;
break;
}
}
if(TMonth==2)
{
  if((TYear % 4)==0)
  {
        if(Tdat > 29)
{
  alert('Invalid date')
  return;
}
Tdat=Tdat + 29;
  }
  else
  {
      if(Tdat > 28)
{
  alert('Invalid date')
  return;
}
  Tdat=Tdat+28;
  }
}
Fdate=Tdat-Odat;
TMonth = TMonth - 1;
}
if(TMonth >= OMonth)
{
Fmonth = TMonth - OMonth ;
}
else
   Fmonth = TMonth - OMonth + 12;
TYear=TYear-1;
}
Fyear=TYear - OYear;

alert('Year :'+Fyear + '\n Month :' + Fmonth + '\n Day :' + Fdate);
}

Calculate day difference between two date using javascript


function GetdateDiff()
{
var Tdate=new Date(2009,1,13) //Date(yyyy,mm,dd)
var Odate=new Date(2009,2,13)//Date(yyyy,mm,dd)
alert((Odate - Tdate)/(1000*60*60*24));
}

Thursday, February 12, 2009

How to display logo in Address bar of browser

<head runat="server">  

    <link rel="Shortcut icon" href="IMAGES/logo.jpg" /> 

<\head>


Color Name and Hexadecimal value

          background color           text color in black            text color in white         Hex Value   

 steelblue

 steelblue

 steelblue

4682B4

 royalblue

 royalblue

 royalblue

041690

 cornflowerblue

 cornflowerblue

 cornflowerblue

6495ED

 lightsteelblue

 lightsteelblue

 lightsteelblue

B0C4DE

 mediumslateblue

 mediumslateblue

 mediumslateblue

7B68EE

 slateblue

 slateblue

 slateblue

6A5ACD

 darkslateblue

 darkslateblue

 darkslateblue

483D8B

 midnightblue

 midnightblue

 midnightblue

191970

 navy

 navy

 navy

000080

 darkblue

 darkblue

 darkblue

00008B

 mediumblue

 mediumblue

 mediumblue

0000CD

 blue

 blue

 blue

0000FF

 dodgerblue

 dodgerblue

 dodgerblue

1E90FF

 deepskyblue

 deepskyblue

 deepskyblue

00BFFF

 lightskyblue

 lightskyblue

 lightskyblue

87CEFA

 skyblue

 skyblue

 skyblue

87CEEB

 lightblue

 lightblue

 lightblue

ADD8E6

 powderblue

 powderblue

 powderblue

B0E0E6

 azure

 azure

 azure

F0FFFF

 lightcyan

 lightcyan

 lightcyan

E0FFFF

 paleturquoise

 paleturquoise

 paleturquoise

AFEEEE

 mediumturquoise

 mediumturquoise

 mediumturquoise

48D1CC

 lightseagreen

 lightseagreen

 lightseagreen

20B2AA

 darkcyan

 darkcyan

 darkcyan

008B8B

 teal

 teal

 teal

008080

 cadetblue

 cadetblue

 cadetblue

5F9EA0

 darkturquoise

 darkturquoise

 darkturquoise

00CED1

 aqua

 aqua

 aqua

00FFFF

 cyan

 cyan

 cyan

00FFFF

 turquoise

 turquoise

 turquoise

40E0D0

 aquamarine

 aquamarine

 aquamarine

7FFFD4

 mediumaquamarine

 mediumaquamarine

 mediumaquamarine

66CDAA

 darkseagreen

 darkseagreen

 darkseagreen

8FBC8F

 mediumseagreen

 mediumseagreen

 mediumseagreen

3CB371

 seagreen

 seagreen

 seagreen

2E8B57

 darkgreen

 darkgreen

 darkgreen

006400

 green

 green

 green

008000

 forestgreen

 forestgreen

 forestgreen

228B22

 limegreen

 limegreen

 limegreen

32CD32

 lime

 lime

 lime

00FF00

 chartreuse

 chartreuse

 chartreuse

7FFF00

 lawngreen

 lawngreen

 lawngreen

7CFC00

 greenyellow

 greenyellow

 greenyellow

ADFF2F

 yellowgreen

 yellowgreen

 yellowgreen

9ACD32

 palegreen

 palegreen

 palegreen

98FB98

 lightgreen

 lightgreen

 lightgreen

90EE90

 springgreen

 springgreen

 springgreen

00FF7F

 mediumspringgreen

 mediumspringgreen

 mediumspringgreen

00FA9A

 darkolivegreen

 darkolivegreen

 darkolivegreen

556B2F

 olivedrab

 olivedrab

 olivedrab

6B8E23

 olive

 olive

 olive

808000

 darkkhaki

 darkkhaki

 darkkhaki

BDB76B

 darkgoldenrod

 darkgoldenrod

 darkgoldenrod

B8860B

 goldenrod

 goldenrod

 goldenrod

DAA520

 gold

 gold

 gold

FFD700

 yellow

 yellow

 yellow

FFFF00

 khaki

 khaki

 khaki

F0E68C

 palegoldenrod

 palegoldenrod

 palegoldenrod

EEE8AA

 blanchedalmond

 blanchedalmond

 blanchedalmond

FFEBCD

 moccasin

 moccasin

 moccasin

FFE4B5

 wheat

 wheat

 wheat

F5DEB3

 navajowhite

 navajowhite

 navajowhite

FFDEAD

 burlywood

 burlywood

 burlywood

DEB887

 tan

 tan

 tan

D2B48C

 rosybrown

 rosybrown

 rosybrown

BC8F8F

 sienna

 sienna

 sienna

A0522D

 saddlebrown

 saddlebrown

 saddlebrown

8B4513

 chocolate

 chocolate

 chocolate

D2691E

 peru

 peru

 peru

CD853F

 sandybrown

 sandybrown

 sandybrown

F4A460

 darkred

 darkred

 darkred

8B0000

 maroon

 maroon

 maroon

800000

 brown

 brown

 brown

A52A2A

 firebrick

 firebrick

 firebrick

B22222

 indianred

 indianred

 indianred

CD5C5C

 lightcoral

 lightcoral

 lightcoral

F08080

 salmon

 salmon

 salmon

FA8072

 darksalmon

 darksalmon

 darksalmon

E9967A

 lightsalmon

 lightsalmon

 lightsalmon

FFA07A

 coral

 coral

 coral

FF7F50

 tomato

 tomato

 tomato

FF6347

 darkorange

 darkorange

 darkorange

FF8C00

 orange

 orange

 orange

FFA500

 orangered

 orangered

 orangered

FF4500

 crimson

 crimson

 crimson

DC143C

 red

 red

 red

FF0000

 deeppink

 deeppink

 deeppink

FF1493

 fuchsia

 fuchsia

 fuchsia

FF00FF

 magenta

 magenta

 magenta

FF00FF

 hotpink

 hotpink

 hotpink

FF69B4

 lightpink

 lightpink

 lightpink

FFB6C1

 pink

 pink

 pink

FFC0CB

 palevioletred

 palevioletred

 palevioletred

DB7093

 mediumvioletred

 mediumvioletred

 mediumvioletred

C71585

 purple

 purple

 purple

800080

 darkmagenta

 darkmagenta

 darkmagenta

8B008B

 mediumpurple

 mediumpurple

 mediumpurple

9370DB

 blueviolet

 blueviolet

 blueviolet

8A2BE2

 indigo

 indigo

 indigo

4B0082

 darkviolet

 darkviolet

 darkviolet

9400D3

 darkorchid

 darkorchid

 darkorchid

9932CC

 mediumorchid

 mediumorchid

 mediumorchid

BA55D3

 orchid

 orchid

 orchid

DA70D6

 violet

 violet

 violet

EE82EE

 plum

 plum

 plum

DDA0DD

 thistle

 thistle

 thistle

D8BFD8

 lavender

 lavender

 lavender

E6E6FA

 ghostwhite

 ghostwhite

 ghostwhite

F8F8FF

 aliceblue

 aliceblue

 aliceblue

F0F8FF

 mintcream

 mintcream

 mintcream

F5FFFA

 honeydew

 honeydew

 honeydew

F0FFF0

 lightgoldenrodyellow

 lightgoldenrodyellow

 lightgoldenrodyellow

FAFAD2

 lemonchiffon

 lemonchiffon

 lemonchiffon

FFFACD

 cornsilk

 cornsilk

 cornsilk

FFF8DC

 lightyellow

 lightyellow

 lightyellow

FFFFE0

 ivory

 ivory

 ivory

FFFFF0

 floralwhite

 floralwhite

 floralwhite

FFFAF0

 linen

 linen

 linen

FAF0E6

 oldlace

 oldlace

 oldlace

FDF5E6

 antiquewhite

 antiquewhite

 antiquewhite

FAEBD7

 bisque

 bisque

 bisque

FFE4C4

 peachpuff

 peachpuff

 peachpuff

FFDAB9

 papayawhip

 papayawhip

 papayawhip

FFEFD5

 beige

 beige

 beige

F5F5DC

 seashell

 seashell

 seashell

FFF5EE

 lavenderblush

 lavenderblush

 lavenderblush

FFF0F5

 mistyrose

 mistyrose

 mistyrose

FFE4E1

 snow

 snow

 snow

FFFAFA

 white

 white

 white

FFFFFF

 whitesmoke

 whitesmoke

 whitesmoke

F5F5F5

 gainsboro

 gainsboro

 gainsboro

DCDCDC

 lightgrey

 lightgrey

 lightgrey

D3D3D3

 silver

 silver

 silver

C0C0C0

 darkgray

 darkgray

 darkgray

A9A9A9

 gray

 gray

 gray

808080

 lightslategray

 lightslategray

 lightslategray

778899

 slategray

 slategray

 slategray

708090

 Dimgray

 dimgray

 dimgray

696969

 Darkslategray

 darkslategray

 darkslategray

2F4F4F

 Black

 black

 black

000000