i have a select box, when user select value other than 'H' then the hidden <DIV> element will showed up, and when user select value 'H' the <DIV> element will hide again
the code is like this :
<option value="H">Is Hidden</option>
<option value="S">Show me the DIV</option>
<option value="X">Show me the DIV (again)</option>
<div id="MyContent" style="display: none">
Name : <br />
<input type="text" name="name" size="20" />
if user select 'S', then the DIV element will showed up
if user select 'X', then the DIV element also still showed up
and if user select 'H', then the DIV element will be hide again
Any suggestions or help would be great.
The steps you'll want to take are:
- attach an onchange event to the select element
- when the page is loaded, trigger that onchange event[list]
- shows or hides the div depending on that class name
If you want someone to write this code for you, we have a Marketplace where peoples services can be hired.
If instead you're here to learn, we can help you there too.