BubikolRamios
02-20-2007, 05:14 PM
mainly interested in how to make "/*1.*/" to work. Thanks for help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html class = "html">
<head class = "head">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script language="javascript" type="text/javascript">
function MyObj()
{
this.doIt = function()
{
/*0.*/ test2('b'); //works
/*1.*/ var t=setTimeout("test2('a')",1000); //does not
/*2.*/ var t=setTimeout("this.test('a')",1000); //does not
/*3.*/ var t=setTimeout("myObj.test('a')",1000); //works
};
this.test = function(param)
{
alert(param);
};
function test2(param)
{
alert(param);
}
}
</script>
<!--end of need this package for css event selectors-->
</head>
<body style = 'height:100%' onload="myObj = new MyObj();" >
<button value="fdjgsda" onclick="myObj.doIt();"> </button>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html class = "html">
<head class = "head">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script language="javascript" type="text/javascript">
function MyObj()
{
this.doIt = function()
{
/*0.*/ test2('b'); //works
/*1.*/ var t=setTimeout("test2('a')",1000); //does not
/*2.*/ var t=setTimeout("this.test('a')",1000); //does not
/*3.*/ var t=setTimeout("myObj.test('a')",1000); //works
};
this.test = function(param)
{
alert(param);
};
function test2(param)
{
alert(param);
}
}
</script>
<!--end of need this package for css event selectors-->
</head>
<body style = 'height:100%' onload="myObj = new MyObj();" >
<button value="fdjgsda" onclick="myObj.doIt();"> </button>
</body>
</html>