473,608 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
+ 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 2170
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
4700
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 choice. This works fine except that when I use javac to compile the code I get the message that I am using a deprecated API. That is, hide() and show() for choices (and presumably other items) is no longer used. I have tried doing a search to find...
5
4494
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 functions I have 2 sub functions under each("Add Job", "View Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a TabControl, so there are 2 TabControl objects on my main screen, each with 2 pages on. When the user...
10
3200
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 layer behind the menus. The closer div has a lower index than the submenu divs so it appears behind them. The closer div contains a transparent gif with an event applied to it to close all of the divs when moused over.
1
15944
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 the code in the form. Is it even possible to do this? If so, how? Thanks!
4
9157
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 program starts. Matthew
1
1523
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 I'm leaving out browser specific code that would enable MAC machines (and browsers made for the MAC) to understand the code and display the menu. My site: Kidneyfoundationofca.com and Site where the Fly-out menu was pulled from:...
3
17013
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 the beginning of my application using VBA and then switch it back on within the exit routine of my application ?
2
1619
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 Transitional//EN"> <HTML> <HEAD> <TITLE></TITLE> <script language="JavaScript" type="text/javascript">
0
8067
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8010
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8501
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8483
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8349
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6820
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5479
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2477
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 we have to send another system
0
1336
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.