• Miércoles 8 de Mayo de 2024, 00:33

Autor Tema:  Coordenadas X,y Del La Ventana Activa  (Leído 1116 veces)

bisoph_as

  • Miembro activo
  • **
  • Mensajes: 57
  • Nacionalidad: mx
    • Ver Perfil
Coordenadas X,y Del La Ventana Activa
« en: Miércoles 3 de Octubre de 2007, 20:04 »
0
Hola hola que hay, pues con el titulo lo dije todo, jeje trate de usar el captureEvents pero creo que no lo estoy haciendo bien, necesito una asesoria intesiva, jeje bueno espero que alguien me puedea ayudar. Bueno el evento que dispara mi funcion es un mouseover, sobre un link, pero pues chambea pero no del todo.
Código: Text
  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  6. <title>Documento sin título</title>
  7. <script language="javascript" type="text/javascript">
  8. <!--
  9. function next(forma,ubicacion)
  10. {
  11. var e=document.captureEvents(Event.MOUSEOVER);
  12.  
  13.    forma.preview.src=ubicacion;
  14.   forma.x.value= e.pageX;
  15.   forma.y.value= e.pageY;
  16.  
  17. }
  18.  
  19. //-->
  20. </script>
  21. </head>
  22.  
  23. <body><form name="miformulario" >
  24. <table border="0" width="100%" align="center" ><tr ><td>
  25.  
  26. <fieldset title="Imagenes">
  27. <legend  style=" font-family:Geneva, Arial, Helvetica, sans-serif; color:#0066CC; font-size:8pt; font-weight:bold;"> Imagenes en el Servidor </legend>
  28.  
  29. <img src='../documentos/logo.jpg' width='83' height='78' name='preview'  />
  30. <input type="text" name="x" value="" />
  31. <input type="text" name="y" value="" />
  32.  
  33. <ul>
  34. <li><a href='javascript:;' onclick='opener.document.miformulario.simagen.value="mugger_ipod_b.jpg"; window.close();' onMouseOver='next(document.miformulario,"../documentos/mugger_ipod_b.jpg");'>mugger_ipod_b.jpg</a></li><li><a href='javascript:;' onclick='opener.document.miformulario.simagen.value="imagem_girl_firefox.jpg"; window.close();' onMouseOver='next(document.miformulario,"../documentos/imagem_girl_firefox.jpg");'>imagem_girl_firefox.jpg</a></li><li><a href='javascript:;' onclick='opener.document.miformulario.simagen.value="logo.jpg"; window.close();' onMouseOver='next(document.miformulario,"../documentos/logo.jpg");'>logo.jpg</a></li></ul>
  35. </fieldset>
  36. </td></tr>
  37. <tr><td align="center"><input type="button" name="cancel" onclick="window.close();" value="Cerrar" /></td></tr>
  38. </table>
  39. </form>
  40. </body>
  41. </html>
  42.  
  43.  
  44.  
next() es mi funcion, y aqui llamo a la funcion dentro del form en los links, no se si aprecian, ents cambia el src  la imagen "dinamicamente" pero quiero saber en que posicion esta el curso. Osea en que link se esta posando. Ya lo demas yo lo intento sale? Gracias de antemano...
 :lightsabre:  :comp:
JeSús dice: Cometer Errores Es humano Perdonar es divino