Ver Mensaje Individual
  #4 (permalink)  
Antiguo 19/08/2008, 14:20
Avatar de jseros
jseros
 
Fecha de Ingreso: agosto-2008
Ubicación: Bogotá
Mensajes: 218
Antigüedad: 16 años, 6 meses
Puntos: 18
Respuesta: Problema con cuadro de texto y calendario emergente

Cita:
Iniciado por Rockzilla Ver Mensaje
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&oacute;</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&oacute;(&#37;)</td>
                
<td width="178" height="24"><input name="porcentaje" type="text" id="porcentaje"size="20"maxlength="30" /></td>
                <
td width="117">&nbsp;</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 setso 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>&nbsp;</td>
              </
tr>
              <
tr bgcolor="#CCCCCC" class="Estilo1">
                <
td>Fecha de final </td>
                <
td height="24"><!-- ggPosX and ggPosY not setso popup will autolocate to the right of the graphic -->
                  <
input type="text" name="f_f" size="20">
                  <!-- 
ggPosX and ggPosY not setso 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>&nbsp;</td>
              </
tr>
              <
tr bgcolor="#CCCCCC" class="Estilo1">
                <
td>Fecha real de culminaci&oacute;n</td>
                <
td height="24"><input type="text" name="f_r" size="20">
                  <!-- 
ggPosX and ggPosY not setso 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>&nbsp;</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>&nbsp;</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>&nbsp;</td>
              </
tr>
          </
table>
          <
h6>&nbsp;</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&deg;</option>
                                <
option>2&deg;</option>
                                <
option>3&deg;</option>
                                <
option>4&deg;</option>
                              </
select>
                </
div>
                </
label></th>
                <
th bgcolor="#CCCCCC" scope="col">&nbsp;</th>
                <
th bgcolor="#CCCCCC" class="Estilo1" scope="col">&nbsp;</th>
                <
th scope="col">&nbsp;</th>
              </
tr>
              <
tr>
                <
th width="95" bgcolor="#CCCCCC" class="Estilo1" scope="col">&nbsp;</th>
                <
th width="130" scope="col">                  <div align="right"></div></th>
                <
th width="10" bgcolor="#CCCCCC" scope="col">&nbsp;</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>&nbsp;</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

Última edición por jseros; 19/08/2008 a las 14:22 Razón: Mejor explicación de la respuesta