Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hide <div> onClick?

Status
Not open for further replies.

planeboy747

Technical User
Joined
Jan 11, 2005
Messages
41
Location
US
To see the form I'm working on, go to:

You'll notice when the page loads there are Acceptance Terms section and an button (agree). When you click on the button, the script unhides what's behind, div id="second", which actually loads the form.

Here's the function I'm using to do this:
---------------------------------------------------
function authorize()
{
var elem = document.getElementById("second");
elem.style.display = "block";

}
---------------------------------------------------

When the script loads div id="second" I would like it to also hide div id="accTerms", but I'm not sure what to script in the above function that will do that?
 
Code:
function authorize()
{
  var elem = document.getElementById("second");
  elem.style.display = "block";
  document.getElementById('accTerms').style.display = 'none';
}

--Chessbot

"In that blessed region of Four Dimensions, shall we linger on the threshold of the Fifth, and not enter therein? Ah, no! [...] Then, yielding to our intellectual onset, the gates of the Sixth Dimension shall fly open; after that a Seventh, and then an Eighth -- --" Flatland, A. Square (E. A. Abbott)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top