• Post Reply Bookmark Topic Watch Topic
  • New Topic

option values are not being shown when using javascript  RSS feed

puja shaw
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

posted Today 17:09:20

i am stuck with a problem regarding javascript.I am trying to add an option to the select box and add a value to that option through javascript.The option is getting added but the value is not being shown in that option.I am not able to figure out where the problem lies.Can you please help me.

<select id="SelectHidden" name="SelectHiddenThing" onClick="MyFunction1();">



function MyFunction1(){

var box=document.getElementById("SelectHidden");

var anoption=document.createElement("OPTION");








  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!