Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

creating a text box if the option is "other" from the drop down by javascript  RSS feed

ranjan panda
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The case is there is a drop down in my xsl where in if my user selects the "other" option then a text box should be rendered in the resulting HTML so that the user can write a name which does not exist in the drop down.
Is the following the right approach?
function checkOther(){
var sel = document.MainForm.CurrentInsurer.value;
I am using javascript for the first time. So who ever want to help me write the complete code for the javascript function and the code for how to call that function from my drop down <select> tag.

Thank you.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!