473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Hide menu using Jscript

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 2154
gits
5,390 Expert Mod 4TB
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.