karthiseenu Posted June 24, 2006 Share Posted June 24, 2006 Hai friends, I want to make the combobox as editable is there any way to do this Link to comment Share on other sites More sharing options...
scott100 Posted June 24, 2006 Share Posted June 24, 2006 Hai friends, I want to make the combobox as editable is there any way to do this<{POST_SNAPBACK}> You want to change the options text/value?document.getElementById('cars').options[0].text="ford";cars is the name of the select box and 0 is the first item.to change the values as well as text just use .value="ford" Link to comment Share on other sites More sharing options...
karthiseenu Posted June 26, 2006 Author Share Posted June 26, 2006 You want to change the options text/value?document.getElementById('cars').options[0].text="ford";cars is the name of the select box and 0 is the first item.to change the values as well as text just use .value="ford" <{POST_SNAPBACK}> No it should be like a text box i wants that type of editing Link to comment Share on other sites More sharing options...
scott100 Posted June 26, 2006 Share Posted June 26, 2006 No it should be like a text box i wants that type of editing<{POST_SNAPBACK}> create the textbox then access it contents and put it in the dropdownval = document.getElementById('txtbox').value;document.getElementById('cars').options[0].text=val;txtbox = the id of the textbox Link to comment Share on other sites More sharing options...
karthiseenu Posted June 26, 2006 Author Share Posted June 26, 2006 create the textbox then access it contents and put it in the dropdownval = document.getElementById('txtbox').value;document.getElementById('cars').options[0].text=val;txtbox = the id of the textbox <{POST_SNAPBACK}> Thanks is there any other way with out textbox Link to comment Share on other sites More sharing options...
scott100 Posted June 26, 2006 Share Posted June 26, 2006 Thanks is there any other way with out textbox<{POST_SNAPBACK}> Any type of form element should work.http://www.w3schools.com/js/tryit.asp?file..._option_settext Link to comment Share on other sites More sharing options...
justsomeguy Posted June 26, 2006 Share Posted June 26, 2006 If you're asking if you can make a select element that you can directly edit, you can't do that with HTML or javascript. Link to comment Share on other sites More sharing options...
karthiseenu Posted June 27, 2006 Author Share Posted June 27, 2006 If you're asking if you can make a select element that you can directly edit, you can't do that with HTML or javascript.<{POST_SNAPBACK}> Thanks to all Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now