Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/08/2009, 17:23
Avatar de gerson
gerson
 
Fecha de Ingreso: febrero-2005
Ubicación: Lima
Mensajes: 481
Antigüedad: 20 años
Puntos: 4
Respuesta: Como meto este javascript en php?

No es de esta manera:
Código PHP:
echo '
<script type="text/javascript">
var options = {
script:"test.php?json=true&limit=6&",
varname:"input",
json:true,
shownoresults:false,
maxresults:6,
callback: function (obj) { document.getElementById(\'testid\').value = obj.id; }
};
var as_json = new bsn.AutoSuggest(\'testinput\', options);


var options_xml = {
script: function (input) { return "test.php?input="+input+"&testid="+document.getEle mentById(\'testid\').value; },
varname:"input"
};
var as_xml = new bsn.AutoSuggest(\'testinput_xml\', options_xml);
</script>'

__________________