Voy a poner un código que me da el problema mencionado (creo que no va a servir de mucho, pero por intetarlo que no quede):
El script que uso para mostrar un calendario, y en el cual hay un Div que "A veces" me deja el rastro de la tabal que contiene es el siguiente:
[url=http://www.tarrget.info/calendar/scw.js ]http://www.tarrget.info/calendar/scw.js [/url]
Código :
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Formulario2.aspx.vb" Inherits="Formulario2" %>
<!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 id="Head1" runat="server">
<title></title>
<link href="../../common/css/intra.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<style type="text/css">
body{background-color:#F3F3F3;}
</style>
<style type="text/css">
.style2
{
width: 264px;
}
.style3
{
width: 207px;
}
.style4
{
width: 203px;
}
</style>
<style type="text/css">
body{background-color:#F3F3F3;}
.ocultaEle{visibility:hidden}
</style>
<script
src="../../common/script/scw.js"
type="text/javascript">
</script>
</head>
<body bgcolor="#F3F3F3">
<form id="form1" runat="server" >
<p> </p>
<table style="background-color:#AFEEEE;
margin:0 auto 0 auto;
border-width: medium; border-style: outset;">
<tr>
<td align="center"">
Formulario 2
</td>
</tr>
</table>
<p> </p>
<table class="ArbolMadridPeque">
<tr>
<td class="style3">
Estado<asp:SqlDataSource
ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:cnBBDD1 %>"
ProviderName="<%$ ConnectionStrings:cnBBDD1 .ProviderName %>"
SelectCommand="SELECT Cod_Estado, Descripcion FROM Aux_Estados WHERE (Cod_Estado IN (2,3,4,5,7,10,16)) ">
</asp:SqlDataSource>
</td>
<td class="style4">
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource1" DataTextField="Descripcion"
DataValueField="Cod_Estado">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style3">
Alta Atributos</td>
<td class="style4">
<asp:CheckBox ID="CheckBox2" runat="server" Text="Dominio 1"
AutoPostBack="True" Width="90%" />
<br />
<asp:CheckBox ID="CheckBox3" runat="server" Text="Dominio 2"
AutoPostBack="True" Width="90%" />
<br />
<asp:CheckBox ID="CheckBox4" runat="server" Text="Dominio 3"
AutoPostBack="True" Width="90%" />
</td>
</tr>
</table>
<p> </p>
<table class="ArbolMadridPeque">
<tr>
<td class="style2"">
Ocular:</td>
<td style="width:"50%;">
<asp:DropDownList ID="DropDownList5" runat="server" AutoPostBack="True">
<asp:ListItem Value="0" Selected="True">--</asp:ListItem>
<asp:ListItem Value="S">Si</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<%If Me.DropDownList5.SelectedItem.Value = "S" Then%>
<tr>
<td class="style2"">
Fecha Solicitud Encargo</td>
<td style="width:"50%;">
<asp:TextBox ID="TextBox29" runat="server" Width="104px"></asp:TextBox>
<input type="button" id="Button38"
onclick="scwShow(TextBox29,event);return false;"
style="
background:url('../../imagenes/Generales/cal_peque.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><input type="button" id="Button39"
onclick="javascript:borraFecha('TextBox29')"
style="
background:url('../../imagenes/Generales/eliminar3.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server"
ControlToValidate="TextBox29"
ErrorMessage="Fecha Solicitud Encargo Obligatoria"
EnableClientScript="False"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style2"">
Fecha Recepción Encargo</td>
<td style="width:"50%;">
<asp:TextBox ID="TextBox30" runat="server" Width="104px"></asp:TextBox>
<input type="button" id="Button40"
onclick="scwShow(TextBox30,event);return false;"
style="
background:url('../../imagenes/Generales/cal_peque.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><input type="button" id="Button41"
onclick="javascript:borraFecha('TextBox30')"
style="
background:url('../../imagenes/Generales/eliminar3.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server"
ControlToValidate="TextBox30"
ErrorMessage="Fecha Recepción Encargo Obligatoria"
EnableClientScript="False"></asp:RequiredFieldValidator>
</td>
</tr>
<%End If%>
<tr>
<td class="style2"">
Opciones:</td>
<td style="width:"50%;">
<asp:DropDownList ID="DropDownList6" runat="server" AutoPostBack="True">
<asp:ListItem Value="0" Selected="True">--</asp:ListItem>
<asp:ListItem Value="S">Si</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<%If Me.DropDownList6.SelectedItem.Value = "S" Then%>
<tr>
<td class="style2">
1º Destinatario</td>
<td>
<asp:DropDownList ID="DropDownListUnidad" runat="server"
DataSourceID="SqlDataSource5" DataTextField="Nombre_Destinatario"
DataValueField="Cod_Destinatario"
Font-Size="X-Small" AutoPostBack="True">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:cnBBDD1 %>"
ProviderName="<%$ ConnectionStrings:cnBBDD1.ProviderName %>"
SelectCommand="SELECT * FROM [Aux_Destinatarios]"></asp:SqlDataSource>
</td>
</tr>
<tr>
<td class="style2">
1º Fecha Envio</td>
<td>
<asp:TextBox ID="TextBox31" runat="server" Width="104px"></asp:TextBox>
<input type="button" id="Button42"
onclick="scwShow(TextBox31,event);return false;"
style="
background:url('../../imagenes/Generales/cal_peque.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><input type="button" id="Button43"
onclick="javascript:borraFecha('TextBox31')"
style="
background:url('../../imagenes/Generales/eliminar3.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server"
ControlToValidate="TextBox31"
ErrorMessage="Fecha Recepción Encargo Obligatoria"
EnableClientScript="False"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style2">
1º Fecha Recepción</td>
<td>
<asp:TextBox ID="TextBox32" runat="server" Width="104px"></asp:TextBox>
<input type="button" id="Button44"
onclick="scwShow(TextBox32,event);return false;"
style="
background:url('../../imagenes/Generales/cal_peque.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><input type="button" id="Button45"
onclick="javascript:borraFecha('TextBox32')"
style="
background:url('../../imagenes/Generales/eliminar3.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server"
ControlToValidate="TextBox32"
ErrorMessage="Fecha Recepción Encargo Obligatoria"
EnableClientScript="False"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style2">
2º Destinatario</td>
<td>
<asp:DropDownList ID="DropDownListUnidad0" runat="server"
DataSourceID="SqlDataSource6" DataTextField="Nombre_Destinatario"
DataValueField="Cod_Destinatario"
Font-Size="X-Small" AutoPostBack="True">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource6" runat="server"
ConnectionString="<%$ ConnectionStrings:cnBBDD1 %>"
ProviderName="<%$ ConnectionStrings:cnBBDD1.ProviderName %>"
SelectCommand="SELECT * FROM [Aux_Destinatarios]"></asp:SqlDataSource>
</td>
</tr>
<tr>
<td class="style2">
2º Fecha Envio</td>
<td>
<asp:TextBox ID="TextBox33" runat="server" Width="104px"></asp:TextBox>
<input type="button" id="Button46"
onclick="scwShow(TextBox33,event);return false;"
style="
background:url('../../imagenes/Generales/cal_peque.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><input type="button" id="Button47"
onclick="javascript:borraFecha('TextBox33')"
style="
background:url('../../imagenes/Generales/eliminar3.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server"
ControlToValidate="TextBox33"
ErrorMessage="Fecha Recepción Encargo Obligatoria"
EnableClientScript="False"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style2">
2º Fecha Recepción</td>
<td>
<asp:TextBox ID="TextBox34" runat="server" Width="104px"></asp:TextBox>
<input type="button" id="Button48"
onclick="scwShow(TextBox34,event);return false;"
style="
background:url('../../imagenes/Generales/cal_peque.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><input type="button" id="Button49"
onclick="javascript:borraFecha('TextBox34')"
style="
background:url('../../imagenes/Generales/eliminar3.gif') no-repeat center top;
overflow:visible;
width:28px;
height:20px;
border:none;
"
/><asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server"
ControlToValidate="TextBox34"
ErrorMessage="Fecha Recepción Encargo Obligatoria"
EnableClientScript="False"></asp:RequiredFieldValidator>
</td>
</tr>
<%End If%>
<% If 1 = 2 Then%>
<%End If%>
<tr>
<td class="style2">
Observación Nueva</td>
<td>
<asp:TextBox ID="TextBox19" runat="server" Rows="3" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2" colspan="2">
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:cnBBDD1 %>"
ProviderName="<%$ ConnectionStrings:cnBBDD1.ProviderName %>"
SelectCommand="SELECT [Fecha], [Observacion] FROM [Observaciones] WHERE (([Ejercicio] = ?) AND ([Num_Expediente] = ?))">
<SelectParameters>
<asp:SessionParameter Name="Ejercicio" SessionField="vSubEjercicio"
Type="Int32" />
<asp:SessionParameter Name="Num_Expediente" SessionField="vSubExpediente"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" CssClass="ArbolMadrid"
DataSourceID="SqlDataSource2" PageSize="2">
<Columns>
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha"
SortExpression="Fecha" />
<asp:BoundField DataField="Observacion" HeaderText="Observacion"
SortExpression="Observacion" />
</Columns>
</asp:GridView>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
</table>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</form>
<script type="text/javascript">
function ocultarFila(num, ver) {
//Si Ver = 1 -> Dis = ''
//Si Ver = 0 -> Dis = 'none'
dis = ver ? '' : 'none';
//alert(dis)
tab = document.getElementById('tbDatos');
tab.getElementsByTagName('tr')[num].style.display = dis;
}
function ocultarColumna(num, ver) {
//Si Ver = 1 -> Dis = ''
//Si Ver = 0 -> Dis = 'none'
dis = ver ? '' : 'none';
fila = document.getElementById('tbDatos').getElementsByTagName('tr');
for (i = 0; i < fila.length; i++)
fila[i].getElementsByTagName('td')[num].style.display = dis;
}
</script>
<script type="text/javascript">
// La primera fila es la cero.
if (1 == 1) {
//ocultarFila(1, 0)
//ocultarFila(2, 0)
//ocultarFila(3, 0)
//ocultarFila(4, 0)
}
else {
ocultarFila(6, 0)
ocultarFila(7, 0)
ocultarFila(8, 0)
ocultarFila(9, 0)
ocultarFila(10, 0)
}
function borraFecha(control) {
document.getElementById(control).value = ""
//alert(control);
}
</script>
<%'Inicio --- Para borrar el calendario que sale la primera vez que se carga la página%>
<img id="img33" src="" alt="" onclick="javascript:loQueSea();" width="1" height="1" />
<script type="text/javascript" id="clientEventHandlersJS" language="javascript">
<!--
//alert("prueba234")
document.getElementById("img33").click()
function loQueSea() {
//alert('prueba loQueSea')
}
//-->
</script>
<% 'Fin --- Para borrar el calendario que sale la primera vez que se carga la página%>
<script type="text/vbscript" language="vbscript" >
function convierteMoneda(control)
'msgbox(control)
'msgbox("Msg Vbscript")
'msgbox(document.getElementById("TextBox23").value)
'msgbox(formatcurrency(7777777777))
if isnumeric(document.getElementById(control).value) then
document.getElementById(control).value = formatcurrency(document.getElementById(control).value)
end if
end function
function asignaValor(control)
document.getElementById(control).value = document.getElementById(control).value
end function
</script>
<script type="text/javascript">
<!--
function deshab() {
frm = document.forms['form1'];
for (i = 0; ele = frm.elements[i]; i++)
ele.disabled = true;
}
//alert("<%=Session("vSubPerfil")%>")
<%if (Session("vSubPerfil") = "P") or _
not (Session("vEstado") = "1" or Session("vEstado") = "3") _
then %>
//deshab();
<%end if %>
//scwID('scw').style.visibility='hidden'
//scwID('scwIframe').style.visibility='hidden';
document.getElementById("scwIE").style.visibility = 'hidden'
//scwID('scwCell').style.visibility ='hidden';
//document.getElementById("btGrabar").disabled= false;
//-->
</script>
<script type="text/javascript">
function ocultatodo() {
estotaabierto = document.getElementsByTagName("div");
for (var i = 0; i < estotaabierto.length; i++) {
//### Esto funciona, si tiene Id el Div te lo enseña:
//alert(estotaabierto[i].id); //Esto funciona, si tiene
//### Esto funciona, el Div existe pero te lo oculta
estotaabierto[i].style.visibility = 'hidden'
//### Esto funciona, el Div deja de existir
//estotaabierto[i].style.display='none'
}
}
ocultatodo();
function ocultascwIE() {
alert("ffaaaa");
document.getElementById("scwIE").style.visibility = "hidden"
document.getElementById("scwIE").style.display = "none"
estotaabierto = document.getElementsByTagName("div");
for (var i = 0; i < estotaabierto.length; i++) {
//### Esto funciona, si tiene Id el Div te lo enseña:
//alert(estotaabierto[i].id); //Esto funciona, si tiene
//### Esto funciona, el Div existe pero te lo oculta
estotaabierto[i].style.visibility = 'hidden'
//### Esto funciona, el Div deja de existir
//estotaabierto[i].style.display='none'
}
}
function reloadfff() {
location.reload();
}
function ocultaDisplay() {
alert("ffdddd55");
//document.addEventListener('click', scwHide, false);
//document.attachEvent('onclick', scwHide);
scwHide()
}
scwShow(TextBox1, event);
</script>
<label id="lbb1" onclick="javascript:ocultascwIE();">ocultascwIE</label><br/>
<label id="Label1" onclick="javascript:reloadfff();">reloadfff</label><br/>
<label id="Label2" onclick="javascript:ocultaDisplay();">ocultaDisplay</label><br/>
</body>
</html>