spooke2k Posted July 2, 2007 Share Posted July 2, 2007 i have a form with a list field , 2 txtfields and a button. I want to make it so that if a field is selected in the listbox, it then locks out the txtfield for entry so that the user cant do both. it sounds simple enough but i cant work out how to do this. Ive had a look but struggled to find a way to do this any ideas please. Spooke2k Link to comment https://forums.phpfreaks.com/topic/58072-locking/ Share on other sites More sharing options...
sayedsohail Posted July 11, 2007 Share Posted July 11, 2007 use document.getElementById("yourfieldname").disabled = true; or code below is not tested, but this you can get something similar to disable your 1text and enable 2text or vise versa. onChange(this.disabled="true"); hope it helps. Link to comment https://forums.phpfreaks.com/topic/58072-locking/#findComment-295390 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.