Foros del Web » Creando para Internet » HTML »

Formularios Html. action input="image"

Estas en el tema de Formularios Html. action input="image" en el foro de HTML en Foros del Web. Hola a Todos ! . tengo un problema con este codigo <html> <head> <script language="JavaScript1.2"> var zoomfactor=0.10 //Enter factor (0.05=5%) function zoomhelper(){ if (parseInt(whatcache.style.width)>10&&parseInt(what cache.style.height)>10){ ...
  #1 (permalink)  
Antiguo 15/07/2010, 15:41
 
Fecha de Ingreso: julio-2010
Mensajes: 1
Antigüedad: 13 años, 9 meses
Puntos: 0
Formularios Html. action input="image"

Hola a Todos ! . tengo un problema con este codigo

<html>
<head>
<script language="JavaScript1.2">



var zoomfactor=0.10 //Enter factor (0.05=5%)



function zoomhelper(){

if (parseInt(whatcache.style.width)>10&&parseInt(what cache.style.height)>10){

whatcache.style.width=parseInt(whatcache.style.wid th)+parseInt(whatcache.style.width)*zoomfactor*pre fix

whatcache.style.height=parseInt(whatcache.style.he ight)+parseInt(whatcache.style.height)*zoomfactor* prefix

}

}



function zoom(originalW, originalH, what, state){

if (!document.all&&!document.getElementById)

return

whatcache=eval("document.images."+what)

prefix=(state=="in")? 1 : -1

if (whatcache.style.width==""||state=="restore"){

whatcache.style.width=originalW+"px"

whatcache.style.height=originalH+"px"

if (state=="restore")

return

}

else{

zoomhelper()

}

beginzoom=setInterval("zoomhelper()",100)

}



function clearzoom(){

if (window.beginzoom)

clearInterval(beginzoom)

}



</script>
<title>

Ingresos de datos con mapas de imagen
</title>
</head>
<body> <!--onload="setupZoom()" -->
<!--<h1>
Ingreso de datos con mapas de imagen
</h1> -->
<form method="post" action="coordenadas2.php">
<!--Haga click en la imagen:
<br>-->
<a href="#" onmouseover="zoom(120,60,'myimage2','in')" onmouseout="clearzoom()"> <img src="../images/lupa3.bmp" border="0" width="17" height="17"></a> | <a href="#" onmouseover="zoom(967,393,'myimage2','restore')"> <img src="../images/lupa2.bmp" border="0" width="17" height="17"></a> | <a href="#" onmouseover="zoom(120,60,'myimage2','out')" onmouseout="clearzoom()"><img src="../images/lupa1.bmp" border="0" width="17" height="17"></a>

<div style="position:relative;width:120;height:60"><div style="position:absolute">

<img name="myimage2" src="../images/padre.png"> | <input name="myimage2" type="image" src="../images/padre.png">
</div></div>

<!--<img class="zoomi" src="map.jpg" alt="map.jpg" /> -->


</form>


</body>
</html>


Sobre la misma imagen, quiero hacer el zoom y cuando de un click sobre la imagen ,realice el action - input para que me envie a otra imagen... pero el problema es que me imprime dos imagenes y en cada una hace algo diferente..
me podrian ayudar a hacer el zoom y el action en la misma imagen ??? ..

Gracias..
  #2 (permalink)  
Antiguo 15/07/2010, 23:12
Avatar de emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Formularios Html. action input="image"

susana:

la script que pasaste está plagada de errores, este es solo un fragmento
dónde dice:

Código Javascript:
Ver original
  1. function zoomhelper(){
  2. if (parseInt(whatcache.style.width)>10&&parseInt(what cache.style.height)>10){
  3. whatcache.style.width=parseInt(whatcache.style.wid th)+parseInt(whatcache.style.width)*zoomfactor*pre fix
  4. whatcache.style.height=parseInt(whatcache.style.he ight)+parseInt(whatcache.style.height)*zoomfactor* prefix
  5. }
  6. }
debe decir:

Código Javascript:
Ver original
  1. function zoomhelper(){
  2. if ((parseInt(whatcache.style.width)>10)&&(parseInt(whatcache.style.height)>10)){
  3. whatcache.style.width=parseInt(whatcache.style.width)+parseInt(whatcache.style.width)*zoomfactor*prefix;
  4. whatcache.style.height=parseInt(whatcache.style.height)+parseInt(whatcache.style.height)*zoomfactor*prefix;
  5. }
  6. }


y habia unos cuantos más...

al clickear en la imagen inferior te lleva a coordenadas2.php, por otra parte en ese form tan extraño que has implementado, no encuentro dato alguno que pasar al coordenadas2.php.

Te dejo una demo del efecto funcionando en
http://foros.emprear.com/html/susana_18/zoom.html
el efecto es medio raro, bueno, al menos con las imágenes que puse, espero no seas pretenciosa.
Ah, y trata de no usar BMP, JPG preferiblemente

Saludos

Etiquetas: formulario, acciones
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:31.