javascript browser detection script

// <![CDATA[
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
var objId=document.getElementById("StageArea");
if ((browser=="Microsoft Internet Explorer") && (version

<script>
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
var objId=document.getElementById(“StageArea”);
if ((browser==”Microsoft Internet Explorer”) && (version<7)) {
if ((screen.width==1024) && (screen.height==768)){

objId.style.height=”472px”;
objId.style.overflow=”visible”;

}
else{
objId.style.height=”725px”;
objId.style.overflow=”visible”;
}

}
else  {
if ((screen.width==1024) && (screen.height==768)){
objId.style.minHeight=”472px”;
}
else{
objId.style.minHeight=”695px”;
}

}

</script>

Add comment August 11, 2009

iframe change src | javascript

A small snippet for the people who wanna change src of Iframe on click.

Example

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>

<script type=”text/javascript”>
function changeURL(id){
alert(id);
newURL=”http://yahoo.com”;
document.getElementById(id).src=newURL;
}
</script>

</head>

<body>
<form name=”testForm”>
<iframe id=”test” name=”testName” src=”http://google.com”></iframe>
</form>
<a href=”#” onclick=”changeURL(‘test’);”>dfdfd</a>

</body>
</html>

Add comment July 27, 2009

India in New Zealand [1st T20 Match ]

India on Thursday Paid price for being to aggressive. It all started with Virendar Shewag smashing Tim Southee for 3 sixes in very first over.
India have often been accused of making slow starts to overseas tours, but no one can make that accusation this time – their first 11 balls in New Zealand went for 25 runs. Unfortunately for India, they got too greedy – the short boundaries at the AMI Stadium in Christchurch offered a temptation few of their batsmen could resist.
No one actually showed the patience to stick at the wicket and place through all the overs. If it wouldn’t have been Suresh Raina, India Team might have had the worse start to their NewZealand tour.

Team India need to Think about following things

1. T20 is not always bang bang game.
2. Bring in Ravindra Jadeja in place of Rohit Sharma as his off spiners will be effective.
3. Have a settle start for 5 overs then start bang bang.

In case u liked this article leave a comment

2 comments February 26, 2009

Is Indian Team World No 1

Well there’s been lot of discussion happening all around the world is Dhoni’s men in Blue are the next world No 1 side?. Beating Aussies in their own backyard then at home and then beating England and Now srilanka. But I still feel their is a long way to go

Indian fielding looks crap except Suresh Raina.

Bowling looks ordinary especially spin department

Controlling the middle overs 15-40 [ Give away lot of runs without many wickets].

They won series in Srilanka as then won toss in all the four games they won.

Add comment February 9, 2009

Olympics 2008 | Can India Produce michael phelps ? | If Phelps was Indian

Although India occupies only 2.4% of the world’s land area, it supports over 15% of the world’s population. Only China has a larger population. Even then we don’t have a sportsperson who can win Gold for us Except Bindra.

India at last produced a Gold Medal for which whole nation was waiting for years in the form of Abhinav Bindra.
But Indian Govt has nothing to do with Bindra’s Success. There were always a shortage of proper ranges, Training camps, ammunations.

Now let us think of a Interesting Scenario just think if phelps was an Indian then

1. He might have easily outraced sachin, Dhoni in ads.

2. He might have had his temples everywhere.

3. He might have had his Phelps fan associations.

4. Hell No of Bollywood Heroines where lerking around him with marriage proposals.

5. Each state might have given him 1 crore for each gold that is 27*8= 216 crores.

6. Each political Party might have had him as a Leader.

7. At school Level there might be textbooks named after him.

Add comment August 19, 2008

Olympics 2008 | Incredible Michael Phelps

Swim demon Michael Phelps won his 8th gold medal of the 2008 Olympics last night, his 14th overall. How does he do it? It’s that crazy 6′4″ bod of his! “Generally, a man’s arm span equals his height but in his case it’s 6′7″—three inches more than his height. Naturally his arms work as powerful propulsive paddles, giving him a clear edge over others. His lower body, interestingly, is shorter than that of an average man of his height. His relatively short legs result in less drag or resistance. In short, Phelps has an upper body of a 6′8″ person but his lower body seems to be of someone who is only 5′10″, which also make the perfect plane in water.” More science after the jump. His size 14 feet may not dwarf Ian Thrope’s size 17 but Phelps’ double-jointed ankles allow him to do a ballerina’s ‘pointe’ standing on the tips of the toes. It allows him to whip his feet as if those are flippers and break loose.

His unique constitution also produces less lactic acid than others which means Phelps takes less time to recover. And if he looks indefatigable at times, it’s because of the Attention Deficit Hyperactivity Disorder, which he was diagnosed with at the tender age of nine. His daily routine is equally mindboggling.

He consumes 12,000 calorie every day and trains 96 km every week. Naturally it was hardly surprising when Russian swimmer Alexander Sukhorukov went on to describe Phelps as “just a normal person, from a different planet, a planet from a different galaxy.”

2 comments August 19, 2008

Solution for PNG images in css

Many of us might have nightmare’s using png images as they are not supported in IE. Here is the solution we can use to overcome that nightmare

 

Method 1:

html>body .className{
 background: url(“../images/suresh kumar.png”) no-repeat;
}

Method 2:

* html #id{
    background:url(“../images/none.gif”);
 filter: progid XImageTransform.Microsoft.AlphaImageLoader(src=’images/sureshkumar.png’, sizingmethod=’crop’);
 cursor: hand;
}

1 comment August 5, 2008

min-height hack/workaround in IE6,IE7 & Firefox

Hey i was wondering how to use min-height for all the 3 browsers and came across a workaround and which works wonders in all the 3 browsers.

selector {
min-height: 103px;
_height: auto !important;
height: 103px;
border:1px solid red;
}

In case it helps please leave a comment.

12 comments June 13, 2008

mouse cordinates using jquery

Jquery Code to get mouse co-ordinates.

$(“html”).click(function(e){ alert(‘X: ‘ + e.pageX +’, Y:’+ e.pageY); });

1 comment April 25, 2008

Top 25 medical colleges

Rank Name of Institute City
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
AIIMS
CMC
AFMC (Army)
JIPMER
Seth GS Medical College
Maulana Azad Medical College
King George’s Medical University
Kasturba Medical College
St John’s
Grants Medical College
LTM Medical College, Sion
Institute of Medical Sciences, BHU
BJ Medical College
Bangalore Medical College
Amrita Institute of Medical Sciences
Madras Medical College
Osmania Medical College
Calcutta Medical College
Stanley Medical College
Christian Medical College
Government Medical College
Gandhi Medical College
University College of Medical Sciences
BJ Medical College
Jawaharlal Nehru Medical College
Delhi
Vellore
Pune
Pondicherry
Mumbai
Delhi
Lucknow
Manipal
Bangalore
Mumbai
Mumbai
Varanasi
Pune
Bangalore
Kochi
Chennai
Hyderabad
Calcutta
Chennai
Ludhiana
Mysore
Hyderabad
Delhi
Ahmedabad
Belgaum

6 comments March 31, 2008

Previous Posts


Spam Blocked

Flickr Photos

acceptance

Cardiac

310/365 November 6, 2009

More Photos

Blogroll

Recent Posts

Recent Comments

izdelava spletne str… on Convert em,px,pt and % in…
CSS References, Tuto… on Convert em,px,pt and % in…
shirley on Convert em,px,pt and % in…
Brightshore Miami on Convert em,px,pt and % in…
zolofth on Mozilla Addons and IE Addons f…

Pages

Top Clicks

Top Posts

Blog Stats