Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript+css question thanks

Status
Not open for further replies.

melnet

Programmer
Jul 8, 2003
77
HK
Hello~

left corner in ie displays happened error
however the page works.
any where have error??

thanks

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<script language="JavaScript" type="text/JavaScript">
Lindex=new Array(1,2);

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function alertPop(str){
	alert (str);
}
function move(Lno){
	//str="document.all.";
	//document.all.layers["Layer1"].className = "test";
	//document.all.Layer1.className="test";
	for (x=1;x<Lindex.length;i++){
		if (Lno==1){
			document.all.Layer1.className="top";
			document.all.Layer2.className="second";
		}else if(Lno==2){
			document.all.Layer1.className="first";
			document.all.Layer2.className="top";
		}
	}
}
//-->

</script>
<style type="text/css">
.top {
	z-index:100;
}
.first {
	z-index:1;
}
.second {
	z-index:2;
}
</style>
</head>

<body>

<div id="Layer1" style="position:absolute; left:205px; top:70px; width:153px; height:143px; z-index:#; background-color: #6699FF; layer-background-color: #6699FF; border: 1px none #000000;"><img src="object14.jpg" width="210" height="161" border="0" usemap="#Map"> 
  <map name="Map">
    <area shape="rect" coords="1,-1,209,162" href="#" onclick="move(1);">
  </map>
</div>
<div id="Layer2" style="position:absolute; left:261px; top:133px; width:184px; height:157px; z-index:#; background-color: #00CC00; layer-background-color: #00CC00; border: 1px none #000000;"><img src="object14.jpg" width="185" height="159" border="0" usemap="#Map2"> 
  <map name="Map2">
    <area shape="rect" coords="0,1,184,160" href="#" onclick="move(2);">
  </map>
</div>

</body>
</html>
 
Yes - your "for" loop. You are using variable "x", but incrementing "i". Furthermore - why have a for loop at all, since inside it, you are referencing neither x nor i.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top