![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
21/09/2004, 03:45
|
![Avatar de KarlanKas](http://static.forosdelweb.com/customavatars/avatar11549_2.gif) | Moderador extraterrestre | | Fecha de Ingreso: diciembre-2001 Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 1 mes Puntos: 61 | |
Qué te parece esto:
Página de productos (fíjate en los enlaces y en la función): Código HTML: <html>
<head>
<title>Untitled</title>
<script>
function popup(este){
formulario=window.open("formulario.html?producto="+este,"popup","width=500,height=400");
}
</script>
</head>
<body>
<a href="//Abrir formulario//" onclick="popup('plancha');return false;">Comprar plancha</a>
<a href="//Abrir formulario//" onclick="popup('secador');return false;">Comprar secador</a>
</body>
</html> Página del formulario (formulario.html): Código HTML: <html>
<head>
<title>Untitled</title>
<script>
producto2=location.href.split("producto=")[1];
</script>
</head>
<body onload="document.forms['formulario']['producto'].value=producto2;">
<form name="formulario">
<input name="producto" type="text">
</form>
</form>
</body>
</html> Te sería más cómodo esto?
__________________ Cómo escribir
No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia. |