Just starting to learn js. Have a hidden text box. Want to enable users to click button to display that text box and click another button to hide instructions. Seems two functions needed but I do not know syntax. For example,
function showInstructions()
{
document.getElementById("Instructions").style.display = 'block';
}
The text is <cfinput type="hidden" name="Instructions">
Then there is <input name="instruct" type="button" value="Show Instructions" onclick="showInstructions();"/>
This does not work. What do I need to do to get it working? Also will place another button to hide instructions.
Thank you,
John
function showInstructions()
{
document.getElementById("Instructions").style.display = 'block';
}
The text is <cfinput type="hidden" name="Instructions">
Then there is <input name="instruct" type="button" value="Show Instructions" onclick="showInstructions();"/>
This does not work. What do I need to do to get it working? Also will place another button to hide instructions.
Thank you,
John