How do I make a DIV visible if a form action is taken

Hello,

How does one make a DIV visible if a form action is taken, such as a Radio button selected?

But here is the thing: this DIV that is to become visible and invisible upon radio clicked does not contain a simple short Text message, but instead this DIV contains many Images for selection. I mean I know how to turn on/off a DIV via Javascript command:

document.getElementById("action_label").innerHTML= "something here";

but again this DIV is to contain many images and the inputs for selecting one of these images so that Javascript command will just not cut it.

Looking forward to your suggestion.

If the div is generated dynamically (or hard coded), all you have to do is add a style tag to it


<div style="display:none;">Stuff here.</div>

Then, with JS:


// On
document.getElementById("action_label").style.display = 'block';

// Off
document.getElementById("action_label").style.display = 'none';


I’d also suggest you use jQuery if you’re doing any heavy lifting with JS.