Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/11/2003, 08:59
Avatar de tunait
tunait
Moderadora
 
Fecha de Ingreso: agosto-2001
Ubicación: Terok Nor
Mensajes: 16.805
Antigüedad: 22 años, 8 meses
Puntos: 381
Eso te pasa porque tal y como lo tienes no haces un submit de tu formulario, si no que le mandas a otra dirección.

Entonces cuando le das al intro, sí te hace un submit y el tema no está preparado para trabajar con un submit.

Lo que hice fue adaptar el código para que funcione haciendo submit, tanto desde el botón-imagen como dándole al intro


<SCRIPT LANGUAGE="JavaScript">

var g,ch;
function search()
{
g=document.log1.T1.value;
ch=document.log1.D1.value;
if(ch=="no")
{
alert("Triar on fer la cerca");
document.log1.D1.focus();
return false
}
if(g=="")
{
alert("Què vol cercar?");
document.log1.T1.focus();
return false;
}
if(ch=="a")
return "http://www.musealia.com/modules.php?op=modload&name=PostWrap&file=index&pa ge=http://www.musealia.com/agenda2/search.php?searchword="+g;
if(ch=="d")
return "http://www.musealia.com/modules.php?op=modload&name=Web_Links&file=index&r eq=search&query="+g;

if(ch=="x")
return "http://www.musealia.com/modules.php?op=modload&name=Search&file=index&acti on=search&overview=1&stories_topics[]=0&stories_cat[]=0&active_stories=1&q="+g;
if(ch=="g")
return "http://www.musealia.com/modules.php?op=modload&name=PostWrap&file=index&pa ge=http://www.musealia.com/laguia/search.php?searchword="+g;
}
var sto="download"
var sta="Fet" // style="text-align: center; text-transform: uppercase;"
// End -->
</script>


<form method="post" name="log1" onsubmit="if(search()){this.action = search();}else{return false}" action="">
<p align="center">
<input type="text" name="T1" size="16" value="">
<input type="image" border="0" src="themes/PostNuke/images/buscar.gif" width="12" height="13" title="Search" style="cursor:hand"><br>
<select size="1" name="D1">
<option value="no">Cercar a :</option>
<option value="a" selected>Agenda</option>
<option value="d">Directori</option>
<option value="x">Arxiu</option>
<option value="g">Guia de Museus</option>
</select>
</form>

De esta forma a mi me funcionó correcto