Error al agregar código

Por favor, tengo el siguiente código que funciona perfectamente, el problema es que cuando quiero agregar un nuevo vinculo, un segundo, entonces la opción copiar que ofrece la tabla ya no funciona, solo funciona con un sol vinculo, ¿puedes ayudarme?
Gracias
</table>
</font>
<center>	
<SCRIPT LANGUAGE="JavaScript">
<!--// browser sniff
var IE4 = ((navigator.userAgent.indexOf("MSIE")!=-1) && navigator.appVersion.substring(0,1) >= 4);	
function clikker(a) {
	if(IE4) {
		if (a.style.display =='') {
			a.style.display = 'none';
		}
		else {
			a.style.display='';
		}
	}
}
//-->
</SCRIPT>
<p>
<br><br>
</p>
<center>	
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD WIDTH=395 BGCOLOR="#ffffff">
                    <!---------INICIO DEL BLOQUE---->
<!-- Tips 01 -->
<a name=1><DIV ID="arrow" ONCLICK="clikker(text1);" style="cursor:hand;">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
    <TD VALIGN="TOP">
    <p align="center">
    <TD>
	<p align="center">
    <B>
    <font color="#0000ff">
    </p>
<p class=MsoNormal align="center"><span lang=ES>Activo </span></p>
</font> </B>
    </font>
   </TD>
</TR>
</TABLE>
</DIV>
<DIV ID="text1" STYLE="display:'none';" ONCLICK="window.event.cancelBubble = true;">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
	<TD VALIGN="TOP">
	<p align="center">
	<TD VALIGN="TOP">
	<TABLE BORDER="0" CELLSPACING="5" CELLPADDING="5">
	<TR>
	<TD><p align="center"><b><font color="#000000">
<p class=MsoNormal align="center"><span lang=ES><TABLE borderColor=#ffffff cellSpacing=1 cellPadding=2 width=470 
        bgColor=#000000 border=0>
          <TBODY>
          <TR>
            <TD width="100%" bgColor=#008080>
            <p align="center">
            <FONT face=Verdana color=#000000 
              size=2><STRONG> Activo Agotable.</STRONG></FONT></TD></TR>
          <TR>
            <TD width="100%" bgColor=#f3f3f3>
              <TABLE cellSpacing=0 cellPadding=10 width="100%" border=0>
                <TBODY>
                <TR>
                  <TD><FONT face=Verdana size=2><STRONG>
                    <P align=center><font color="#000000"><TEXTAREA id=moscod name=contenido rows=7 cols=53>
                    <!---------INICIO  DE LA TABLA---->
                    (Recursos no renovables). 
Son aquellos no susceptibles de ser reproducidos o reemplazados, lo cual implica un agotamiento en la medida que sean explotados. El agotamiento es la extinción de un recurso natural mediante la extracción, bombeo, corte, o de algún otro medio que reduzca el depósito, la existencia o el crecimiento de los recursos naturales.</TEXTAREA><BR>
                    </font><INPUT 
                    type=hidden value="A cursiva" name=nombre><INPUT type=hidden 
                    value=129 name=num><font color="#000000"> </font><INPUT style="BACKGROUND: #008080; font-face: 'verdana'" 
onclick='moscod.select(); document.execCommand("copy"); moscod.blur()' type=button value=Copiar><font color="#000000">
                    </font></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<p align="center"><BR> </DIV></p>
</BLOCKQUOTE></TD></TR></TBODY></TABLE>
<p align="center"> </p>
<p align="center"> </p> </span>
                       <!---------FIN  DE LA TABLA---->
</font></b>
    <p align="center"></p>
	</TD>
	</TR>
	</TABLE>
	</TD>
</TR>
</TABLE>
</DIV>
                    <!---------FIN DEL BLOQUE---->
                    <!---------AL AGREGAR AQUÍ OTRO BLOQUE, LA OPCIÓN COPIAR QUE TIENE LA TABLA YA NO FUNICIONA---->
	</TD>
</TR>
</TABLE>
</DIV>
 </tr>
</table>

1 respuesta

Respuesta
1
Intenta meter las dos tablas en el mismo bloque, poniendo inicio tabla 1, fin tabla 1, inicio tabla 2, fin tabla 2, ¿ok?
A ver si así va... hasta otra!
Gracias por tu tiempo.
El código que me devolviste funciona perfectamente, pero cuando agrego otra tabla, ahí te envío el código con la nueva tabla, la opción de copiar no funciona, aparerce un error. El código que me enviaste funciona, el siguiente no, ¿Se puede solucioinar?
<script language="JavaScript">
<!--// browser sniff
var IE4 = ((navigator.userAgent.indexOf("MSIE")!=-1) && navigator.appVersion.substring(0,1) >= 4);
function clikker(a) {
if(IE4) {
if (a.style.display =='') {
a.style.display = 'none';
}
else {
a.style.display='';
}
}
}
//-->
</script>
<p> <br>
<br>
</p>
<center>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=395 bgcolor="#ffffff">
<!---------INICIO DEL BLOQUE---->
<!-- Tips 01 -->
<a name=1></a>
<div id="arrow" onClick="clikker(text1);" style="cursor:hand;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="TOP"> <p align="center">
<td> <p align="center"> </p>
<b><font color="#0000ff">
<p class=MsoNormal align="center"><span lang=ES>Activo </span></p>
</font> </b> </td>
</tr>
</table>
</div><div id="text1" style="display:'none';" onClick="window.event.cancelBubble = true;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="TOP"> <p align="center">
<td valign="TOP"> <table border="0" cellspacing="5" cellpadding="5">
<tr>
<td><p align="center"><b><font color="#000000">
<p class=MsoNormal align="center"><span lang=ES>
<table bordercolor=#ffffff cellspacing=1 cellpadding=2 width=470
bgcolor=#000000 border=0>
<tbody>
<tr>
<td width="100%" bgcolor=#008080> <p align="center">
<font face=Verdana color=#000000
size=2><strong> Activo Agotable.</strong></font></td>
</tr>
<tr>
<td width="100%" bgcolor=#f3f3f3> <table cellspacing=0 cellpadding=10 width="100%" border=0>
<tbody>
<tr>
<td><font face=Verdana size=2><strong>
<p align=center><font color="#000000">
<textarea id=moscod name=contenido rows=7 cols=53>
<!---------INICIO DE LA TABLA---->
(Recursos no renovables).
Son aquellos no susceptibles de ser reproducidos o reemplazados, lo cual implica un agotamiento en la medida que sean explotados. El agotamiento es la extinción de un recurso natural mediante la extracción, bombeo, corte, o de algún otro medio que reduzca el depósito, la existencia o el crecimiento de los recursos naturales. </textarea>
<br>
</font>
<input
type=hidden value="A cursiva" name=nombre>
<input type=hidden
value=129 name=num>
<font color="#000000"> </font>
<input name="button" type=button style="BACKGROUND: #008080; font-face: 'verdana'"
onClick='moscod.select(); document.execCommand("copy"); moscod.blur()' value=Copiar>
<font color="#000000"> </font></p>
</strong></font></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<p align="center"><br>
<p></p>
</span></font></b></td>
</tr>
</table>
<p align="center"> </p>
<p align="center"> </p>
<!---------FIN DE LA TABLA---->
<p align="center"></p></td>
</tr>
</table></td>
</tr>
</table>
<!---------FIN DEL BLOQUE---->
<!---------AL AGREGAR AQUÍ OTRO BLOQUE, LA OPCIÓN COPIAR QUE TIENE LA TABLA YA NO FUNICIONA---->
<!---------INICIO DEL BLOQUE---->
<!-- Tips 01 -->
<a name=2></a>
<div id="arrow" onClick="clikker(text2);" style="cursor:hand;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="TOP"> <p align="center">
<td> <p align="center"> </p>
<b><font color="#0000ff">
<p class=MsoNormal align="center"><span lang=ES>Activo </span></p>
</font> </b> </td>
</tr>
</table>
</div><div id="text2" style="display:'none';" onClick="window.event.cancelBubble = true;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="TOP"> <p align="center">
<td valign="TOP"> <table border="0" cellspacing="5" cellpadding="5">
<tr>
<td><p align="center"><b><font color="#000000">
<p class=MsoNormal align="center"><span lang=ES>
<table bordercolor=#ffffff cellspacing=1 cellpadding=2 width=470
bgcolor=#000000 border=0>
<tbody>
<tr>
<td width="100%" bgcolor=#008080> <p align="center">
<font face=Verdana color=#000000
size=2><strong> Activo Agotable.</strong></font></td>
</tr>
<tr>
<td width="100%" bgcolor=#f3f3f3> <table cellspacing=0 cellpadding=10 width="100%" border=0>
<tbody>
<tr>
<td><font face=Verdana size=2><strong>
<p align=center><font color="#000000">
<textarea id=moscod name=contenido rows=7 cols=53>
<!---------INICIO DE LA TABLA---->
(Recursos no renovables).
Son aquellos no susceptibles de ser reproducidos o reemplazados, lo cual implica un agotamiento en la medida que sean explotados. El agotamiento es la extinción de un recurso natural mediante la extracción, bombeo, corte, o de algún otro medio que reduzca el depósito, la existencia o el crecimiento de los recursos naturales. </textarea>
<br>
</font>
<input
type=hidden value="A cursiva" name=nombre>
<input type=hidden
value=129 name=num>
<font color="#000000"> </font>
<input name="button" type=button style="BACKGROUND: #008080; font-face: 'verdana'"
onClick='moscod.select(); document.execCommand("copy"); moscod.blur()' value=Copiar>
<font color="#000000"> </font></p>
</strong></font></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<p align="center"><br>
<p></p>
</span></font></b></td>
</tr>
</table>
<p align="center"> </p>
<p align="center"> </p>
<!---------FIN DE LA TABLA---->
<p align="center"></p></td>
</tr>
</table></td>
</tr>
</table>
<!---------FIN DEL BLOQUE---->
</center>
Por lo que he podido ver, hay dos etiquetas div que sobraban y ademas de eso... No has puesto etiqueta de inicio de tabla, ¿no? No se, a lo mejor es un fallo de tu inspector de html. Te vuelvo a pasar el código depurado y mira eso, porque solo vi la etiqueta "fin de la tabla" y no vi la de inicio.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<script language="JavaScript">
<!--// browser sniff
var IE4 = ((navigator.userAgent.indexOf("MSIE")!=-1) && navigator.appVersion.substring(0,1) >= 4);
function clikker(a) {
if(IE4) {
if (a.style.display =='') {
a.style.display = 'none';
}
else {
a.style.display='';
}
}
}
//-->
</script>
<p> <br>
<br>
</p>
<center>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=395 bgcolor="#ffffff">
<!---------INICIO DEL BLOQUE---->
<!-- Tips 01 -->
<a name=1></a>
<div id="arrow" onClick="clikker(text1);" style="cursor:hand;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="TOP"> <p align="center">
<td> <p align="center"> </p>
<b><font color="#0000ff">
<p class=MsoNormal align="center"><span lang=ES>Activo </span></p>
</font> </b> </td>
</tr>
</table>
</div><div id="text1" style="display:'none';" onClick="window.event.cancelBubble = true;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="TOP"> <p align="center">
<td valign="TOP"> <table border="0" cellspacing="5" cellpadding="5">
<tr>
<td><p align="center"><b><font color="#000000">
<p class=MsoNormal align="center"><span lang=ES>
<table bordercolor=#ffffff cellspacing=1 cellpadding=2 width=470
bgcolor=#000000 border=0>
<tbody>
<tr>
<td width="100%" bgcolor=#008080> <p align="center">
<font face=Verdana color=#000000
size=2><strong> Activo Agotable.</strong></font></td>
</tr>
<tr>
<td width="100%" bgcolor=#f3f3f3> <table cellspacing=0 cellpadding=10 width="100%" border=0>
<tbody>
<tr>
<td><font face=Verdana size=2><strong>
<p align=center><font color="#000000">
<textarea id=moscod name=contenido rows=7 cols=53>
<!---------INICIO DE LA TABLA---->
(Recursos no renovables).
Son aquellos no susceptibles de ser reproducidos o reemplazados, lo cual implica un agotamiento en la medida que sean explotados. El agotamiento es la extinción de un recurso natural mediante la extracción, bombeo, corte, o de algún otro medio que reduzca el depósito, la existencia o el crecimiento de los recursos naturales.</textarea>
<br>
</font>
<input
type=hidden value="A cursiva" name=nombre>
<input type=hidden
value=129 name=num>
<font color="#000000"> </font>
<input name="button" type=button style="BACKGROUND: #008080; font-face: 'verdana'"
onClick='moscod.select(); document.execCommand("copy"); moscod.blur()' value=Copiar>
<font color="#000000"> </font></p>
</strong></font></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<p align="center"><br>
<p></p>
</span></font></b></td>
</tr>
</table>
<p align="center"> </p>
<p align="center"> </p>
<!---------FIN DE LA TABLA---->
<p align="center"></p></td>
</tr>
</table></td>
</tr>
</table>
<!---------FIN DEL BLOQUE---->
<!---------AL AGREGAR AQUÍ OTRO BLOQUE, LA OPCIÓN COPIAR QUE TIENE LA TABLA YA NO FUNICIONA---->
</center>
</body>
</html>
Hasta otra y espero haberte ayudado!

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas