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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking question

Status
Not open for further replies.

MrPantsTm

Programmer
Jan 22, 2004
71
0
0
US
what do I need to do to make links reveal parts of the website. For example, if they click a link some menu buttons are displayed. I'd prefer not to use a form and I've seen this done. I'm pretty sure it's done with js but I could be wrong. Thanks!
 
This little function shows or hides any object on your page.
Code:
[COLOR=blue]function[/color] ShowHide(obj, show)
{
   [COLOR=blue]if[/color] (show == [COLOR=blue]true[/color])
      obj.style.display = '';      
   [COLOR=blue]else[/color]
      obj.style.display = 'none';         
}
JC



Friends are angels who lift us to our feet when our wings have trouble remembering how to fly...
 
Alternatively, if you just want to make the objects invisible but keep the "placeholder" where they would have normally appeared (to keep your formatting intact) use:
Code:
function ShowHide(obj, show) {
   if (show == true)
      obj.style.visibility = "visible";
   else
      obj.style.visibility = "hidden";
}

Hope this helps.

Pete.

Web Developer & Aptrix / IBM Lotus Workplace Web Content Management (LWWCM) Specialist
w: e: Pete.Raleigh(at)lclimited.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top