Search
 
SCRIPT & CODE EXAMPLE
 

HTML

HOW TO PERFORM AN ACTION AN OPTION IS CLICKED IN DROP DOWN

<select id="dropdown" onChange="showHide()">

    <option value="A">option1</option>
    <option value="B">option2</option>
    <option value="C">option3</option>
    <option value="D">option4</option>
</select>


 function showHide()
 {
   hideAll();
  var val = document.getElementById("dropdown").value;

  if(val == "A")
   document.getElementById("firstTextBoxId").style.display = 'block';
  else if(val == "B")
   document.getElementById("secondTextBoxId").style.display = 'block';
  else if(val == "C")
   document.getElementById("ThirdTextBoxId").style.display = 'block';
  else if(val == "D")
   document.getElementById("FourthTextBoxId").style.display = 'block';

}


function hideAll()
   {
      document.getElementById("firstTextBoxId").style.display = 'none';
      document.getElementById("secondTextBoxId").style.display = 'none';
      document.getElementById("thirdTextBoxId").style.display = 'none';
      document.getElementById("fourthTextBoxId").style.display = 'none';

    }
Comment

PREVIOUS NEXT
Code Example
Html :: modal in html, angular 
Html :: simplexml load file character encoding url 
Html :: Title Tag Checker 
Html :: Prevent snippets from web page to be shown on search engine results 
Html :: cara meretas website 
Html :: remove line the link css 
Html :: set favicon in cross browser 
Html :: nastro adesivo termico 
Html :: html role for icon 
Html :: asp.net get innerhtml of div 
Html :: site.baseurl page.image_path 
Html :: Capturing the amount of space related to the text html 
Html :: git local and remote gitignore 
Html :: Creating Github logo with CSS 
Html :: keyboard accessible buttons on navbar 
Html :: twig post 
Html :: How to add background color in specific region using HTML 
Html :: infinityblogger.in 
Html :: hirudhimap.blogspot.com 
Html :: simple form label 
Html :: beatify html 
Html :: How to link Excel sheet to HTML page 
Html :: html how to make a link traget a new window 
Css :: css second td in table 
Css :: css center everything 
Css :: center postion absdolute 
Css :: 100vh - 100px 
Css :: css flex center 
Css :: mat slide toggle change color 
Css :: vertically center an svg 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =