Frames Cursor Changed

[Total: 0    Average: 0/5]

This example shows how to have the cursor type changed by a click on a form button.

Body Code:

<!--
1. this is the code for the frameset file - call it whatever you would like to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Untitled</title>
<script>
var _bool=false;
var _original="default";
var _changeTo="move"; /* crosshair, default, move, etc... */
function changeEm()
{
  _bool = ! _bool; 
  f1.document.styleSheets[0].rules[0].style.cursor=_bool?_original:_changeTo;
  f2.document.styleSheets[0].rules[0].style.cursor=_bool?_original:_changeTo;
  f3.document.styleSheets[0].rules[0].style.cursor=_bool?_original:_changeTo;
  f4.document.styleSheets[0].rules[0].style.cursor=_bool?_original:_changeTo;
}
</script>
</head>
<frameset rows="25%,25%,25%,25%">
<frame name=f1 src=f.html>
<frame name=f2 src=f.html>
<frame name=f3 src=f.html>
<frame name=f4 src=f.html>
</frameset>
</html>

-->


<!--
2. this is the code for the file called f.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Untitled</title>
<style>
body {cursor: default;}
</style>
</head>

<body>

f.html<BR>
<form name=m1>
<input type=button name=b1 value="Cursor Change" onclick="top.changeEm()">
</form>

</body>
</html>

-->

Times Viewed: 3

Leave a Reply

Your email address will not be published. Required fields are marked *