JavaScript - Problema con Script en tabla

 
Vista:

Problema con Script en tabla

Publicado por angel pineda (1 intervención) el 05/05/2011 06:05:50
hola.
Antes que nada soy un poco nuevo en esto.
Me gustaria una pequeña ayuda, me pasaron un codigo de una tabla que rebotaba en la parte izquierda de la pagina y yo lo trate de poner dentro de una tabla pero no funciono.
Me podrian ayudar?? porfavor estoy en la universidad y recien comienso, porfavor ayudenme.
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<table>
     <tr>
       <td>
        <div>
          <table width="100" border="1" bordercolor="#BBBBBB" cellspacing="0" cellpadding="4">
		<tr>
		<td align=center>
                <img src="image1.gif" alt="Menu"></td>
		</tr>
		<tr>
		<td align=center>
                <font size="2"><a href="somepage.html">Link One</a></font></td>
		</tr>
		<tr>
		<td align=center><font size="2">
                <a href="somepage.html">Link Two</a></font></td>
		</tr>
		<tr>
		<td align=center><font size="2">
                <a href="somepage.html">Link Three</a></font></td>
		</tr>
		<tr>
		<td align=center><font size="2">
                <a href="somepage.html">Link Four</a></font></td>
		</tr>
		<tr>
		<td align=center><font size="2">
                 <a href="somepage.html">Link Five</a></font></td>
		</tr>
	</table>
	</div>
	</td>
    <td>
 </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<script LANGUAGE="JavaScript1.2">
	var XX=20;
	var xstep=1;
	var delay_time=30;
	var YY=0;
	var ch=0;
	var oh=0;
	var yon=0;
 
	var ns4=document.layers?1:0
	var ie=document.all?1:0
	var ns6=document.getElementById&&!document.all?1:0
 
	if(ie){
	YY=document.body.clientHeight;
	point1.style.top=YY;
	}
	else if (ns4){
	YY=window.innerHeight;
	document.point1.pageY=YY;
	document.point1.visibility="hidden";
	}
	else if (ns6){
	YY=window.innerHeight
	document.getElementById('point1').style.top=YY
	}
 
	function reloc1()
	{
	if(yon==0){YY=YY-xstep;}
	else{YY=YY+xstep;}
	if (ie){
	ch=document.body.clientHeight;
	oh=point1.offsetHeight;
	}
	else if (ns4){
	ch=window.innerHeight;
	oh=document.point1.clip.height;
	}
	else if (ns6){
	ch=window.innerHeight
	oh=document.getElementById("point1").offsetHeight
	}
	if(YY<0){yon=1;YY=0;}
	if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
	if(ie){
	point1.style.left=XX;
	point1.style.top=YY+document.body.scrollTop;
	}
	else if (ns4){
	document.point1.pageX=XX;
	document.point1.pageY=YY+window.pageYOffset;
	}
	else if (ns6){
	document.getElementById("point1").style.left=XX
	document.getElementById("point1").style.top=YY+window.pageYOffset
	}
	}
 
	function onad()
	{
	if(ns4)
	document.point1.visibility="visible";
	loopfunc();
	}
	function loopfunc()
	{
	reloc1();
	setTimeout('loopfunc()',delay_time);
	}
	if (ie||ns4||ns6)
	window.onload=onad
 
</script>
</body>


GRACIAS!!!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder