Ver Mensaje Individual
  #11 (permalink)  
Antiguo 14/12/2009, 05:39
radge
 
Fecha de Ingreso: enero-2004
Ubicación: here I Am
Mensajes: 437
Antigüedad: 20 años, 3 meses
Puntos: 1
Respuesta: Llamar a una función JavaScript desde HTML

Yo tengo algo similar....

Desde una página html que recibo parametros quiero cargar esos parametros en otro HTML.

Tengo algo como esto
Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.     function cargarURL()
  3.     {
  4.             // Create variable is_input to see if there is a ? in the url
  5.             var is_input = document.URL.indexOf('?');
  6.            
  7.             // Check the position of the ? in the url
  8.             if (is_input != -1)
  9.             {
  10.                 // Create variable from ? in the url to the end of the string
  11.                 addr_str = document.URL.substring(is_input+1, document.URL.length);
  12.            
  13.  
  14.             document.write='right2.html?'+addr_str+' ';
  15.             }
  16.             // If there is no ? in the url state no values found
  17.             else
  18.             {
  19.                 document.write("No he recibido valores por parametro.");
  20.                 }
  21.     }
  22.        
  23.         </script>


Ahora en el html intento recoger la variable sin éxito
Código HTML:
Ver original
  1. <FRAMESET cols="*,27%">
  2.           <frame name="top" src="left.html" scrolling="no">
  3.         <FRAMESET rows="*,35%" border="5">
  4.               <frame name="dx" src="right.html">
  5.               [B]<frame name="dx2" src="javascript:cargarURL();">[/B]
  6.              
  7.         </FRAMESET>
  8.     </FRAMESET>
__________________
Nuevo foro sobr el mundo del motor - Renault foro
http://www.renaultforo.com