I have a bit of a troublesome spot. I am working on a web page for an instructional course. The user reads a scenario, and then in a text field types their response. What I want to have is a button which says "Check" below the text field which will THEN show a textfield which already has a paragraph of the appropriate answer in it. I have code I found on another reference site, but it does the reverse... the text box is visible right away and you click on a text link to make the box be hidden. Can someone please help modify my code so the textarea is hidden initially and shows when the user clicks the check button?
<span id="button"> <a onclick="hide('hidden')" href="#">Hide Textbox</a> </span> <textarea cols="32" rows="8" id="textbox" name="Answer" >Use the internal reporting chain of command. You should immediately bring this to the attention fo your supervisor. If the situation does not seem to be addressed, you should report it to the next higher level supervisor, contact your CBI Officer, or call the CBI helpLIne.</textarea>
Any help is greatly appreciated!
01-13-2009, 03:48 PM
For starters, you should load the answer field, as a hidden field when the document loads: