Foros del Web » Programando para Internet » Javascript »

Por q me falla???.... :(

Estas en el tema de Por q me falla???.... :( en el foro de Javascript en Foros del Web. Hola amigos!!!: Me gustaria q echárais un vistazo a este código y q me indicarais dnd puede estar el error. La página muestra perfectamente el ...
  #1 (permalink)  
Antiguo 23/01/2003, 05:34
Avatar de Joselete  
Fecha de Ingreso: septiembre-2001
Ubicación: Granada, España
Mensajes: 263
Antigüedad: 22 años, 6 meses
Puntos: 0
Pregunta Por q me falla???.... :(

Hola amigos!!!:
Me gustaria q echárais un vistazo a este código y q me indicarais dnd puede estar el error.

La página muestra perfectamente el buscador, pero a la hora de efectuar la búsqueda me indica errores en la página...


En el HEAD:

<script language="javascript">

window.name= 'portal';

function search(url){
var frm = document.lista_empresas;

if(frm.razonsocial.value != '')
url = url+'&razonsocial=' + formatea(frm.razonsocial.value);

var IndexProv = frm.provincia.selectedIndex;
var valorProv = frm.provincia.options[IndexProv].value;
url = url+'&provincia='+valorProv

document.location.href= url;
//alert('valor'+url);
}


function formatea(input){
CARACTERES = ("ñÑáéíóúàèìòùÁÉÍÓÚÀÈÌÒÙ ");
CARACTERES_SUSTITUIR = ("nNaeiouaeiouAEIOUAEIOU+");

var cadena = "";
var found = false;
for(var i=0; i < input.length; i++){
var chr = input.charAt(i);
found = false;
for(var j=0; j < CARACTERES.length; j++){
if(chr == CARACTERES.charAt(j)){
cadena += CARACTERES_SUSTITUIR.charAt(j);
found = true;
}//if
}//for j

if(!found){
cadena += chr;
}//if

}//for i
return cadena;

}//formatea
</script>


En el BODY

<span class="cuerpo1">Busque GRATIS cualquier empresa:</span>
<table width="226">
<tr>
<td height="143" width="250" nowrap>
<form method="post" action="http://www.e-informa.com:10240/servlet/app?portal=PLAN&id_partner/10102=12&prod=LISTA_EMPRESAS&prod_mostrar=ETIQUETA _EMPRESA" name="lista_empresas">

<table border="0" cellpadding="0" cellspacing="0" width="226">
<tr>
<td colspan="3" align="left"><img src="http://www.e-informa.com/img/spacer.gif" width="1" height="10" alt="" border="0"></td>
</tr>

<td align="left" height="95">
<table border="0" cellpadding="2" cellspacing="0" width="217" align="left">
<tr>
<td width="70"><img src="http://www.e-informa.com/img/hp_buscar_btn_empresa.gif" width="70" height="13" alt="" border="0" hspace="6" align="middle"></td>
<td width="129">
<input type="text" value="Raz&oacute;n Social" size="18" class="auform" name="razonsocial" maxlength="255" tabindex="1">
</td>
</tr>
<tr>
<td height="23" width="80"><img src="http://www.e-informa.com/img/hp_buscar_btn_provincia.gif" width="70" height="13" alt="" border="0" hspace="6" align="middle"></td>
<td colspan="2" class="auform" height="23" width="129">
<br>
<SELECT name=provincia class="auform" tabindex="2">
<OPTION selected value="" class="auform">Sel. Provincia</OPTION>
<OPTION value=01>&Aacute;lava</OPTION>
<OPTION value=02>Albacete</OPTION>
<OPTION value=03>Alicante</OPTION>
<OPTION value=04>Almer&iacute;a</OPTION>
<OPTION value=33>Asturias</OPTION>
<OPTION value=05>&Aacute;vila</OPTION>
<OPTION value=06>Badajoz</OPTION>
<OPTION value=07>Baleares</OPTION>
<OPTION value=08>Barcelona</OPTION>
<OPTION value=09>Burgos</OPTION>
<OPTION value=48>Bilbao (Vizcaya)</OPTION>
<OPTION value=10>C&aacute;ceres</OPTION>
<OPTION value=11>C&aacute;diz</OPTION>
<OPTION value=39>Cantabria (Santander)</OPTION>
<OPTION value=12>Castellón</OPTION>
<OPTION value=55>Ceuta</OPTION>
<OPTION value=13>Ciudad Real</OPTION>
<OPTION value=14>C&oacute;rdoba</OPTION>
<OPTION value=15>Coru&ntilde;a</OPTION>
<OPTION value=16>Cuenca</OPTION>
<OPTION value=17>Gerona</OPTION>
<OPTION value=18>Granada</OPTION>
<OPTION value=19>Guadalajara</OPTION>
<OPTION value=20>Guipuzcoa</OPTION>
<OPTION value=21>Huelva</OPTION>
<OPTION value=22>Huesca</OPTION>
<OPTION value=23>Ja&eacute;n</OPTION>
<OPTION value=24>Le&oacute;n</OPTION>
<OPTION value=25>L&eacute;rida</OPTION>
<OPTION value=27>Lugo</OPTION>
<OPTION value=28>Madrid</OPTION>
<OPTION value=29>M&aacute;laga</OPTION>
<OPTION value=56>Melilla</OPTION>
<OPTION value=30>Murcia</OPTION>
<OPTION value=31>Navarra</OPTION>
<OPTION value=32>Orense</OPTION>
<OPTION value=33>Oviedo</OPTION>
<OPTION value=34>Palencia</OPTION>
<OPTION value=35>Palmas (Las)</OPTION>
<OPTION value=36>Pontevedra</OPTION>
<OPTION value=26>Rioja (La)</OPTION>
<OPTION value=37>Salamanca</OPTION>
<OPTION value=38>Sta Cruz de Tenerife</OPTION>
<OPTION value=39>Santander (Cantabria)</OPTION>
<OPTION value=40>Segovia</OPTION>
<OPTION value=41>Sevilla</OPTION>
<OPTION value=42>Soria</OPTION>
<OPTION value=43>Tarragona</OPTION>
<OPTION value=44>Teruel</OPTION>
<OPTION value=45>Toledo</OPTION>
<OPTION value=46>Valencia</OPTION>
<OPTION value=47>Valladolid</OPTION>
<OPTION value=48>Vizcaya</OPTION>
<OPTION value=49>Zamora</OPTION>
<OPTION value=50>Zaragoza</OPTION>
<OPTION value=00> Todas</OPTION>
</select>

</td>
</tr>
<tr>
<td height="20" width="80">&nbsp;</td>
<td colspan="2" class="auform" height="20" width="129"><a href="javascript:search('http://www.e-informa.com:10240/servlet/app?portal=PLAN&id_partner/10102=12&prod=LISTA_EMPRESAS&prod_mostrar=ETIQUETA _EMPRESA')"><img src="http://www.e-informa.com/img/hp_buscar_btn_buscar.gif" width="62" height="13" alt="" border="0" hspace="6" tabindex="3" align="right"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>

Una ayudita???

GRACIAS!!!

Salu2,
__________________
"El Universo simpre quiere que ganemos"

Última edición por Joselete; 23/01/2003 a las 05:38
  #2 (permalink)  
Antiguo 23/01/2003, 21:20
Avatar de Mickel  
Fecha de Ingreso: mayo-2002
Ubicación: Lima, Peru
Mensajes: 4.619
Antigüedad: 21 años, 10 meses
Puntos: 7
no seria mejor que insertes una url a la pagina?
  #3 (permalink)  
Antiguo 24/01/2003, 02:20
Avatar de Joselete  
Fecha de Ingreso: septiembre-2001
Ubicación: Granada, España
Mensajes: 263
Antigüedad: 22 años, 6 meses
Puntos: 0
no te entendí bien amigo
__________________
"El Universo simpre quiere que ganemos"
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:09.