09.26.08

Blink Tag in IE

Posted in Browser Stuffs at 5:02 pm by meetravi

<html>
<SCRIPT>
// Before you reuse this script you may want to have your head examined
//
// Copyright 1999 InsideDHTML.com, LLC.

function doBlink() {
// Blink, Blink, Blink…
var blink = document.all.tags(“BLINK”)
for (var i=0; i < blink.length; i++)
blink[i].style.visibility = blink[i].style.visibility == “” ? “hidden” : “”
}

function startBlink() {
// Make sure it is IE4
if (document.all)
setInterval(“doBlink()”,1000)
}
window.onload = startBlink;
</SCRIPT>
<body>

hi <BLINK>Ravi</BLINK>

</body>
</html>

08.28.08

To Disable F1 Key in Browser

Posted in Browser Stuffs at 11:10 am by meetravi

Following code is to Disable F1 Key in Browser

<!——–//
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Untitled Document</title>
<script type=”text/javascript” src=”http://yui.yahooapis.com/2.2.0/build/yahoo/yahoo-min.js”></script>
<script type=”text/javascript” src=”http://yui.yahooapis.com/2.2.0/build/event/event-min.js”></script>
<script type=”text/javascript”>

document.focus; //Focusing on the document is important as the F1 key trapped is based on the document object.

function isexplorer(){
if(navigator.appName.indexOf(‘Microsoft’)!=-1)
return true;
else
return false;
}
YAHOO.util.Event.addListener(document, “keydown”, processKeyDown); //This listener listens for keydown event.

document.onhelp = new Function(“return false;”); // To disable default help in IE

function processKeyDown(evnt) {
if ( evnt == null )
evnt = event;
if ( evnt.keyCode == 112 ) //F1
{
help(); // Insert the help function calling or script statement here

if(isexplorer()== false)
{
evnt.preventDefault(); // disable default help in Firefox
}
return false;
}
}

function help()
{
//Handles the help part
alert(‘This is the help function’);

}
</script>
</head >
<body>
<h2 style=”color:blue;”>F1 Key Press Trapping Demo</h2>
</body>
</html>
//–>

08.27.08

To Disable cut,copy,scroll in IE Browser

Posted in Browser Stuffs at 7:26 am by meetravi

<html>
<body ondragstart=”return false” onselectstart=”return false”>
hii.Try selecting or dragggin the text .ain’t it possible rite???? ha ha ha
</body>
</html>

To Disable a Back button in browser

Posted in Browser Stuffs at 6:46 am by meetravi

You can insert this code in all your pages:

<SCRIPT>
<!--
javascript:window.history.forward(1);
//-->
</SCRIPT>