1) i want the text area to show even before you select any value from the drop down.
2) i want the Text editor(NicEdit) to show on all the text area after selecting a value from the drop down to show the text area.
Js For Text-editor(Nicedit):
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript" src="js/nicEdit.js"></script>
- <script type="text/javascript">
- bkLib.onDomLoaded(function() {
- new nicEditor({maxHeight : 200}).panelInstance('area');
- });
- </script>
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript">
- function showHide()
- {
- if(document.getElementById("color_dropdown").selectedIndex == 1)
- {
- document.getElementById("hidden1").style.display = ""; // This line makes the DIV visible
- }
- else {
- document.getElementById("hidden1").style.display = "none"; // This line hides the DIV
- }
- if(document.getElementById("color_dropdown").selectedIndex == 2)
- {
- document.getElementById("hidden2").style.display = ""; // This line makes the DIV visible
- }
- else {
- document.getElementById("hidden2").style.display = "none"; // This line hides the DIV
- }
- if(document.getElementById("color_dropdown").selectedIndex == 3)
- {
- document.getElementById("hidden3").style.display = ""; // This line makes the DIV visible
- }
- else {
- document.getElementById("hidden3").style.display = "none"; // This line hides the DIV
- }
- }
- </script>
Expand|Select|Wrap|Line Numbers
- <select name="menu" id="color_dropdown" onchange="showHide()">
- <option>Select Meun</option>
- <option>One</option>
- <option>Two</option>
- <option>Three</option>
- </select>
- <textarea id="hidden1" name="area" display:none;" id="area">ggggggggggggggggg</textarea>
- <textarea id="hidden2" name="area" display:none;" id="area">hhhhhhhhhhhhhhhhh</textarea>
- <textarea id="hidden3" name="area" display:none;" id="area">yyyyyyyyyyyyyyyyy</textarea>