roeyhaim Posted November 12, 2010 Share Posted November 12, 2010 hello my code is this: <script type="text/javascript" src="jquery-1.2.1.pack.js"></script> <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else { $.post("rpc.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString').val(thisValue); setTimeout("$('#suggestions').hide();", 2000); document.form1.inputString.disabled=true; } </script> as you can see i try to Disabled the text input after the fill done, but when i try this it Disabled the text input before i get to choose from my list (this code is for auto-suggest in form) this is the link to the script: <input type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" name="inputString" /> how i can do this? Link to comment https://forums.phpfreaks.com/topic/218457-disable-text-input/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.