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!

Add ID tag to function

Status
Not open for further replies.

planeboy747

Technical User
Joined
Jan 11, 2005
Messages
41
Location
US
In this function, I need to add another ID tag (id="third), but it's not working. Any thoughts? I think I have it scripted wrong...

function authorize()
{
var elem = document.getElementById("second")("third");
elem.style.display = "block";
document.getElementById('accTerms').style.display = 'none';
}
 
One way:

Code:
function authorize() {
   var ids = new Array('second','third');
   for (var i = 0; i < ids.length; i++)
      document.getElementById(ids[i]).style.display = 'none';
}

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top