473,480 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Hide menu using Jscript

2 New Member
Im trying to hide a menu column using jscript. Its works as required in firefox but ie.. a big no no.

Please see the code below....

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE></TITLE>
  5. <script language="JavaScript" type="text/javascript">
  6.  
  7. function toggleMenu(e){
  8. if(document.getElementById(e).style.display == "")
  9. document.getElementById(e).style.display = "none";
  10. else
  11. document.getElementById(e).style.display = ""; 
  12. }
  13.  
  14. </script>
  15. </HEAD>
  16. <BODY style="margin:0px">
  17.  
  18. <table cellpadding="0" cellspacing="0" id="menuxcdgfTable" width="100%" height="100%" border="1">
  19. <tr>
  20. <td colspan="3" height="100px" style="background-color:fuchsia">header</td>
  21. </tr>
  22. <tr>
  23. <td width="200" id="Menu" style="background-color:aqua;">menu area</td>
  24. <td width="5" style="background-color:lime;cursor:pointer;" onclick="toggleMenu('Menu')">s</td>
  25. <td>main content window</td>
  26. </tr>
  27. </table>
  28. </BODY>
  29. </HTML>
  30.  
Feb 7 '08 #1
1 2156
gits
5,390 Recognized Expert Moderator Expert
hi ...

replace the:

Expand|Select|Wrap|Line Numbers
  1. style.display = "" 
with

Expand|Select|Wrap|Line Numbers
  1. style.display = "block" 
and even when you compare:

Expand|Select|Wrap|Line Numbers
  1. style.display == "block" 
kind regards
Feb 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4678
by: Doug van Vianen | last post by:
Hi, I am using Choice to provide a dropdown menu in an Applet. I create the Choice and then need to hide it until it is needed and then show it. I use c.hide() and c.show() where 'c' is the...
5
4469
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
10
3183
by: David | last post by:
Hi everyone, Hoping there are some .js/browser experts out there that can help with this weird problem. I have made a swap div routine and applied the events to menu buttons with a closer...
1
15932
by: Mary Ann | last post by:
I would like to write code in the On Open property of a form that hides the main menu bar toolbar. I have already customized the menu bar to all for showing/hiding but have no clue how to write...
4
9141
by: Matthew | last post by:
The following code does not hide the form. Any ideas why? Also, is there a workaround? I have VB.NET 2003. I have a system tray icon, and want to have that be the only thing showing when the...
1
1507
by: Steven P. Owen | last post by:
When I use the Fly-out Jscript menu at the following address I can't view the menu on a Apple MAC using IE 5 or Safari 2. Can anyone please take a look at the site I have designed and tell me if...
3
16972
by: prakashwadhwani | last post by:
When my application starts 2 toolbars still remain open 1) Form View and 2) Formatting (Form/Report) Toolbar Also ... Access's default Menu-Bar also remains open. How to switch it off at...
2
1609
by: sunsoffun | last post by:
Im trying to hide a menu column using jscript. Its works as required in firefox but ie.. a big no no. Please see the code below.... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0...
0
7054
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6918
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7057
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6756
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5357
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3008
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1310
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.