Cita:
Iniciado por Rockzilla
buenas a todos tengo un inconveniente este es mi codigo donde refleja un calendario emergente llamado de un boton o un gifs pero lo q yo quiero es q cuando el puntero del mause toque el cuadro de texto automaticamente me muestre el calendario espero q me ayuden este es el codigo
Código PHP:
<table width="533" border="0" align="center">
<tr>
<th width="555" height="457" scope="col"><table width="513" height="73" align="center">
<tr bgcolor="#CCCCCC" class="Estilo1">
<td width="253" rowspan="2"><div align="center">Sistema de Monitoreo y Evaluación </div></td>
<td height="40"><div align="center">Codigo de la Tarea </div></td>
<td><div align="center">
<input name="tarea" type="text" id="tarea"size="20"maxlength="30" />
</div></td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td width="124" height="24"><div align="center">Dependencia</div></td>
<td width="120"><div align="right">
<input name="dependencia" type="text" id="dependencia"size="20"maxlength="255" />
</div></td>
</tr>
</table>
<table width="514" height="30" align="center">
<tr bgcolor="#CCCCCC" class="Estilo1">
<td width="191">Nombre de la actividad </td>
<td width="311" height="24"><textarea name="actividad" cols="45" id="actividad"></textarea></td>
</tr>
</table>
<table width="515" height="164" align="center">
<tr bgcolor="#CCCCCC" class="Estilo1">
<td width="204">Progreso de ejecución (%)</td>
<td width="178" height="24"><input name="porcentaje" type="text" id="porcentaje"size="20"maxlength="30" /></td>
<td width="117"> </td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td>Fecha de inicio </td>
<td height="28"><p>
<input type="text" name="f_i" size="20">
<!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic -->
<a href="javascript:show_calendar('form1.f_i');" onMouseOver="window.status='Elige fecha'; overlib('Pulsa para elegir fecha del mes actual en el calendario del Sistema de Monitoreo.'); return true;" onMouseOut="window.status=''; nd(); return true;"> <img src="show-calendar.gif" alt="Fecha" width=24 height=22 border=0></a></p></td>
<td> </td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td>Fecha de final </td>
<td height="24"><!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic -->
<input type="text" name="f_f" size="20">
<!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic -->
<a href="javascript:show_calendar('form1.f_f');" onMouseOver="window.status='Elige fecha'; overlib('Pulsa para elegir fecha del mes actual en el calendario del Sistema de Monitoreo.'); return true;" onMouseOut="window.status=''; nd(); return true;"> <img src="show-calendar.gif" alt="Fecha" width=24 height=22 border=0></a></td>
<td> </td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td>Fecha real de culminación</td>
<td height="24"><input type="text" name="f_r" size="20">
<!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic -->
<a href="javascript:show_calendar('form1.f_r');" onMouseOver="window.status='Elige fecha'; overlib('Pulsa para elegir fecha del mes actual en el calendario del Sistema de Monitoreo.'); return true;" onMouseOut="window.status=''; nd(); return true;"> <img src="show-calendar.gif" alt="Fecha" width=24 height=22 border=0></a></td>
<td> </td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td>Monto de la Tarea </td>
<td height="24"><input name="monto" type="text" id="monto"size="20"maxlength="30" /></td>
<td> </td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td>Unidad de medida: </td>
<td height="24"><input name="unidad" type="text" id="unidad"size="20"maxlength="30" /></td>
<td> </td>
</tr>
</table>
<h6> </h6>
<table width="511" border="0" bgcolor="#CCCCCC">
<tr>
<th bgcolor="#CCCCCC" class="Estilo1" scope="col"><div align="left">Trimestre</div></th>
<th scope="col"><label>
<div align="right">
<select name="trimestre" type="select" id="trimestre" />
<option>1°</option>
<option>2°</option>
<option>3°</option>
<option>4°</option>
</select>
</div>
</label></th>
<th bgcolor="#CCCCCC" scope="col"> </th>
<th bgcolor="#CCCCCC" class="Estilo1" scope="col"> </th>
<th scope="col"> </th>
</tr>
<tr>
<th width="95" bgcolor="#CCCCCC" class="Estilo1" scope="col"> </th>
<th width="130" scope="col"> <div align="right"></div></th>
<th width="10" bgcolor="#CCCCCC" scope="col"> </th>
<th width="105" bgcolor="#CCCCCC" class="Estilo1" scope="col">Ejecutado</th>
<th width="149" scope="col"><input name="clave222222" type="text" id="clave222222"size="20"maxlength="30" /></th>
</tr>
</table>
<p> </p>
<p>
<input type="submit" value="Incluir" name="B1"></p>
</p>
<p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24">
<param name="BGCOLOR" value="">
<param name="movie" value="button6.swf">
<param name="quality" value="high">
<embed src="button6.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="103" height="24" ></embed>
</object>
</p></th>
</tr>
</table>
Para que no se algo muy molesto para el usuario te recomiendo:
Código HTML:
<input type="text" name="f_r" size="20" onfocus="show_calendar('form1.f_r')">
Espero sea lo que buscas....
Si lo usuas con
onmouseover, osea cuando el puntero pase por encima, va ser algo muy molesto para el usuario. Con
onfocus se abrira el calendario cuando el cursor entre a la caja de texto.
Suerte