Link to home
Start Free TrialLog in
Avatar of aot2002
aot2002

asked on

hiding framed menu bar on left side of screen

http://www.dynamicdrive.com/dynamicindex1/outbar2/index.htm

I am using the code from the site available for my personal webpage project.
i would like to allow it to hide by clicking on the side bar

        Is this possible ?
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

And how to show it again?
Avatar of darksinclair
darksinclair

Will this work?

at teh very start of the left hand menu bar put this:

<DIV ID="toHide">

and at the end of what you dotn want put
</DIV>
<INPUT TYPE="button" value="hide/Show MenuBar" onClick="( ((document.getElementById('toHide').style.display == 'none') ? document.getElementById('toHide').style.display='block' : document.getElementById('toHide').style.display='none'));">

Cheers,
Avatar of aot2002

ASKER

yea how to show it again too.
Avatar of aot2002

ASKER

working on darksinclair's code now !
ASKER CERTIFIED SOLUTION
Avatar of darksinclair
darksinclair

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Excellent, thank you for the grade and the points! if I can be of any more assistance please let me know!

Cheers,
Avatar of aot2002

ASKER

Hey can i use this strictly with a page with Javascript creating a menubar ?

example a page has only a javascript which creates a menu and i want to use this to hide the menu bar ?

if i wrap it around <script> in the page and </script> it doesnt hide it ?
should it
is whats inside the <SCRIPT> and </SCRIPT> a function or is it simply a bunch of code that gets executed as soon as it is parsed by the browser?  (i.e.: Not inside a function blah(){  } ? )

if your code is NOT inside a function and simply by itself and gets called as soon as it is parsed... then yes I do believe that wrapping the DIV tag around the Script tags will do the trick for you (however im not 100% sure but I do believe so.

Cheers,