ambos funcionan bien por separados pero a la hora de utulizarlos en el mismo campo el error surge.
Código HTML:
Ver original
<input name="search-q" id="search-q" type="text" onKeyUp="javascript:autosuggest()" autocomplete="off" onFocus="nextfield ='descrip-q'";/>
autosuggest()
Código Javascript:
Ver original
<script language="javascript"> function autosuggest() { q = document.getElementById('search-q').value; nocache = Math.random(); http.open('get', './arabc/search.php?q='+q+'&nocache = '+nocache); http.onreadystatechange = autosuggestReply; http.send(null); } function autosuggestReply() { if(http.readyState == 4){ var response = http.responseText; e = document.getElementById('results'); if(response!=""){ e.innerHTML=response; e.style.display="block"; } else { e.style.display="none"; } } } </script>
nextfield =''
Código Javascript:
Ver original
<script language="javascript"> nextfield = "descrip-q"; netscape = ""; ver = navigator.appVersion; len = ver.length; for(iln = 0; iln < len; iln++) if (ver.charAt(iln) == "(") break; netscape = (ver.charAt(iln+1).toUpperCase() != "C"); function keyDown(DnEvents) { k = (netscape) ? DnEvents.which : window.event.keyCode; if (k == 13) { if (nextfield == 'done') return true; else { eval('document.venta.' + nextfield + '.focus()'); return false; } } } document.onkeydown = keyDown; if (netscape) document.captureEvents(Event.KEYDOWN|Event.KEYUP); </script>
alguna idea por que se procude el error?
ah y el error del IE se refiere a esta linea
Código Javascript:
Ver original
eval('document.venta.' + nextfield + '.focus()');