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

Hide/ Unhide Frames

Status
Not open for further replies.

manishblr1

Programmer
Dec 20, 2010
20
US
Hi All,
I have a file which contains mixed frames.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "<html>
<head>
<title>Configuration Screens</title>
</head>


<frameset rows="71,*" frameborder="0" border="0" framespacing="0">
<frame name="topNav" src="./CSTopBar.irpt">
<frameset cols="220,*" frameborder="0" border="0" framespacing="0">
<frame name="menu" src="./ConfigurationMenu.irpt" marginheight="0" marginwidth="0" >
<frame name="content" src="/XMII/CM/Testing_AA/Configuration/ProductionCalendar.irpt" marginheight="0" marginwidth="0" >

</frameset>
</frameset>
</html>

i need to hide the frame "Menu" when i click on an image . and unhide it when i click on it again.

Thanks in Advance
 
Something like this?
Code:
<html>
<head>
 <title>Untitled</title>
 <script language="JavaScript">
  function toggleElemDisp(elem){
   if (document.getElementById(elem).style.display=='block'){
    document.getElementById(elem).style.display='none';
   }
   else {
    document.getElementById(elem).style.display='block';
   }
  return true;
 }
 </script>
</head>

<body>
<br>
<div id="menu" style="display: block;">
 This is my menu
</div>
<br>
<img src="EditHelp.gif" onclick="toggleElemDisp('menu');">

</body>
</html>
Since you don't show the context of the image tag you may have to tailor example for the DOM you are using it on. i.e. refrence the parent window or something.


Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top