Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/09/2009, 18:34
eilex
 
Fecha de Ingreso: febrero-2009
Mensajes: 8
Antigüedad: 15 años, 2 meses
Puntos: 0
Respuesta: iframe y form

Cita:
Iniciado por abimaelrc Ver Mensaje
Tendiras que crear un parametro en la funcion de changeSource y llamar el campo algo así
Código html:
Ver original
  1. <body bgcolor="#000000">
  2. <FORM name="formulario" ACTION="" METHOD="POST">
  3. <img border="0" onclick="test.location.href='http;//www,google,es/';document.getElementById('test').frameBorder=1" src="world.jpg" width="16" height="16"><img border="0" src="black.jpg" width="16" height="16"><img border="0" onclick="test.location.href='http;//rampage-clan,ukgame,co,uk';document.getElementById('test').frameBorder=1" src="group.jpg" width="16" height="16"><img border="0" src="black.jpg" width="16" height="16"><img border="0" onclick="test.location.href='http;//space,widicommunity,com';document.getElementById('test').frameBorder=1" src="heart.jpg" width="16" height="16"><img border="0" src="black.jpg" width="16" height="16">
  4. <INPUT TYPE="text" NAME="web" size="100">
  5. <img border="0" onclick="changeSource(document. formulario.web.value)" src="folder_go.jpg" width="16" height="16" TYPE="submit" />
  6. </FORM>
  7. <p>
  8. <script type="text/javascript">
  9. function changeSource(url)
  10.   {
  11.   document.getElementById("test").src=url
  12.   }
  13. <iframe src="http;\\www,widicommunity,com" frameborder="0" name="test" id="test" width=100% height=800 border="0" align="absbottom" marginwidth="1" marginheight="1"></iframe>
  14. </p>
  15. </html>

Lo de url lo entiendo, pero en el formulario ¿como defino url?