Ver Mensaje Individual
  #20 (permalink)  
Antiguo 09/08/2011, 04:08
S_Vai
 
Fecha de Ingreso: agosto-2011
Mensajes: 19
Antigüedad: 12 años, 9 meses
Puntos: 0
Respuesta: Consejo sobre diseño de formulario

Sí, he creado el fichero con el Komodo edit y esto es lo que tengo en "datos.xml":

<?xml version="1.0" encoding="UTF-8"?>

<results>
<rs id="1" info="">Alejandro</rs>
<rs id="2" info="">Alberto</rs>
<rs id="3" info="">Alma</rs>
</results>


En el fichero que genera el texbox tengo esto (seguro que no está bien). Los nombres de variables he dejado los que tenía el código original excepto la llamada al fichero datos.xml.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Autosuggest con AJAX v2.0</title>


<script src="bsn.AutoSuggest_2.1.3.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="autosuggest_inquisitor.css">
<script type="text/javascript">
function autosuggest(){
var options = {
script: "datos.xml?limit=6&",
varname: "materiales",
json:false,
maxresults:10,
timeout:9999,
noresults:'Ingresar nuevo material a la base de datos'
};
var as = new bsn.AutoSuggest('materiales_input', options);
}
</script>
</head>
<body onload="autosuggest();">

<form action="<? echo $_SERVER['PHP_SELF'];?>" method="post" id="formulario" name="form" >
<input type="text" style="width: 200px; " id="materiales_input" name="materiales" autocomplete="off">
<input type="submit" value="Submit" />
</form>

</body>

</html>