Re: Como hacer con PHP que una imagen tenga la misma funcionalidad que un boton con el evento SUBMIT???
| From: | pvergara@tqr.biz | Date: | Mon, 04 Apr 2005 08:27:41 +0000 |
| Subject: | Re: Como hacer con PHP que una imagen tenga la misma funcionalidad que un boton con el evento SUBMIT??? | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-53953@lists.php.net to get a copy of this message | ||
El Lunes 04 Abril 2005 03:46, atzwebdev escribió:
Mira lo mas facil de todo es lo siguiente:
1ºTe creas un <input type="submit"> de los de toda la vida y después defines
su estilo (via class o via style)
2º Al input le indicas que quieres un
background-image=url('<nombreDeLaImagen>') y seguramente tendrás que indicar
también un width y un height que coincidan perfectamente con los de la imagen
Ej:
<input
style="background-image:url('lerele.png');width:100px;height:100px;"
type="submit"
title="Pulse aquí para enviar su información"
/>
Esa es la mejor forma (creo que los navegadores mas antidiluvianos ya
aguantaban estilos mejor que javascript) para lo que andas buscando.
Saludos.
> Hola a todos
>
> Tengo el siguiente codigo que funciona bien con IE pero si hago un test en
> FireFox no finciona ( no se si es por el JavaScript )
>
> La pregunta es: Como hacer con PHP que una imagen tenga la misma
> funcionalidad que un boton con el evento SUBMIT???
> Obviamente sin usar JavaScript ...
>
>
>
> <table align="center" width="700" >
> <tr>
> <?php
> $bol = mysql_query("SELECT IDBOLETIN, NOMBRE, IMAGEN FROM BOLETINES WHERE
> STATUS=1");
> while ( $row = mysql_fetch_array($bol)){
> ?>
> <form name="forma" method="post" action="boletin.php">
> <td><input type="hidden" name="boletin" value="<?php
> echo
> $row['IDBOLETIN']; ?>">
> <span class="metros3_boletin"><a href="#"
> onClick="submit();"><img
> src="Images/<?php echo $row['IMAGEN']; ?>"
> border="0"></a></span></td>
> </form>
> <?php
> }
> mysql_free_result($bol);
> ?>
> </tr>
> </table>
>
>
>
> Gracias por la ayuda ....
>
> atzwebdev
--
----
Pablo C. Vergara Castro.
Departamento de informática.
TQR-Software
Tlfno.: (+34) 986 11 46 40
Fax: (+34) 986 11 46 50