cleary1981 Posted November 14, 2008 Share Posted November 14, 2008 Hi, I want to use javascript to set the value of a select box shown below. <select id="panel_type"> <option id="f">FLOOR STANDING</option> <option id="w">WALL MOUNTED</option> </select> for example if this was a text box i would simply write document.company1.panel_type.value = "FLOOR STANDING"; how do I achieve this if I was using the above select instead? Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted November 14, 2008 Share Posted November 14, 2008 with your code... document.getElementById('f').value = "MyValue"; document.getElementById('f').innerHTML = "My Value"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.