473,594 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Expanding menu script...


I'm having a problem with a script I'm writing. It's designed to expan
a menu using the div tag and some scripting. Basically, there's
division for the "upper level" menus and a division for the men
options below them. the script is designed to simply toggle th
"display" property from "block" to "none" everytime the user clicks o
a supermenu. all i get, though, is an error on the page. here's wha
i've pared it down to:
var Temp = document.all[("s"+divNum)];
Temp.style["display"] = "block";
where the division I'm trying to open has an id value of "s0" and
call the function using javascript:open Menu(0).
so as it stands all the script does is open the submenu once, but if
can get that to work the rest will be cake. does anyone know how t
make this work?
p.s. sorry for the capitalization, the shift key on this keyboar
doesn't work very well >_

MrKillingto
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message39368.htm

Jul 20 '05 #1
3 1944

Seriously, if anyone could help me..

MrKillingto
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message39368.htm

Jul 20 '05 #2
In article <Mr************ *****@mail.foru m4designers.com >,
Mr************* ****@mail.forum 4designers.com enlightened us with...

I'm having a problem with a script I'm writing. It's designed to expand
a menu using the div tag and some scripting. Basically, there's a
division for the "upper level" menus and a division for the menu
options below them. the script is designed to simply toggle the
"display" property from "block" to "none" everytime the user clicks on
a supermenu. all i get, though, is an error on the page. here's what
i've pared it down to:
var Temp = document.all[("s"+divNum)];
Temp.style["display"] = "block";

Your script is IE only, using document.all.

That makes it hard for non-IE users to help you at all.

--
--
~kaeli~
Any sufficiently advanced technology is indistinguishab le
from magic.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #3
"MrKillingt on" <Mr************ *****@mail.foru m4designers.com > wrote in
message news:Mr******** *********@mail. forum4designers .com...
<snip>
... . all i get, though, is an error on the page.
You don't see any reason to mention what that error actually was?
here's what i've pared it down to:
How? Why?
var Temp = document.all[("s"+divNum)];
Temp.style["display"] = "block";
Assuming the browser implements the Microsoft proprietary -
document.all - collection, the mark-up is as described, the ID is unique
on the page (and does not correspond with any NAME attributes), the
browser implements a - style - object on its element objects and
recognises and responds to the dynamic setting of the - display -
property on that - style - object, then the above code should behave as
expected.

Of course you are the only person in a position to tell if all of those
assumptions are correct, as you have not provided that information to
us.
... javascript:open Menu(0).
So is that a javascript: pseudo protocol HREF on a link (in which case:-

<URL: http://www.jibbering.com/faq/#FAQ4_24 >

- and don't do that) or is it an event handling attribute with a
superfluous label, and if so, with which element is it associated? The
DIV? Some other element?

<snip>p.s. sorry for the capitalization, the shift key on
this keyboard doesn't work very well >_<
In a plain text medium like Usenet details like capitalisation and
formatting can go a long way towards improving communication. Simple
things like separating paragraphs (and code blocks) with a blank line
make reading posts considerably easier. And you do not encourage people
to help by discouraging them from reading your question.

<snip> Posted via http://www.forum4designers.com

<snip>

Beyond the fact that the totally inappropriate presentation of
comp.lang.javes cript on forum4designers .com serves to inhibit the
comprehension of most of the code presented on the group, the fact that
forum4designers .com attempted to perpetrate a deception as to the nature
of the service they were providing and still do not adequately attribute
the sources of their content has resulted in a certain level of enmity
for forum4designes. com developing on Usenet. As a result
forum4designers .com is probably an unwise place to ask for help from,
and it is certainly not a good place to read comp.lang.javas cript from.

You would probably be best off accessing Usenet through some sort of
newsreader software (and your ISP's news server(s)), and if web based
assess is all that is possible for you groups.coogle.c om present
comp.lang.javas cript in an undistorted from and allow posting to the
group. There are also numerous other providers of web based access, some
of which do a reasonable job of presenting the group, and none of which
have yet achieved the negative reputation of forum4designers .com.

Richard.
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
10192
by: David | last post by:
It's sad to say, but when using the AOL web site, like to send an email, they have a nifty capability such that when a window is resized, the textarea where the message is input expands not only horizontally, but also vertically, to fill the space. I took a look at their javascripts, but they are quite complex and convoluted since they make use of many of their own functions designed to work with their web site. Does anybody have a...
1
2426
by: M.L. | last post by:
Hi NG, I hope someone in here is able to help me in this matter. The problem: I have created a Javascript drop-down menu which expands when moving the mouse into a tablecell (calls my Expand() function at onMouseover on the <td>-element). My question is now this: How do I delay the expansion of the menu for e.g. 500 ms in order to keep it from happening "by accident". A
4
2679
by: erikd | last post by:
I'm using an expanding tree menu based on the design from Dieter Bungers GMD (www.gmd.de) and infovation (www.infovation.de) named displayToc.js. The problem is that the script isn't working properly in Firefox, although it's working without problems in IE 5.5 & 6.0 In Firefox any file which isn't in the same directory isn't found, so the images are missing and the links don't launch. It may be something simple, but I don't have the...
2
1738
by: weston | last post by:
So, I'm attempting to code an expanding tree menu, based off of unordered lists containing unordered lists. I'm also trying to do it in such a way that none of the javascript has to go inline with the markup: http://weston.canncentral.org/misc/webgallery/FMH/template.html So far, so good. It seems to work in Gecko-based browsers rather well (mouse-over "Online Services" to see it work).
1
2186
by: Bhiksha Raj | last post by:
Hi, I created an expanding menu on one of the frames in my webpage using code I got from http://www.dynamicdrive.com/dynamicindex1/navigate1.htm I have embedded the code (with minor modification to point to my links) into a frame on my webpage. The problem is that when I open the page on netscape 7,
1
2402
by: interfaced | last post by:
Is there a way to make an autosized textbox relative to the content, here is my attempt: <script type="text/javascript"> function checkHeight(el){ var newrows=Math.round(Form.Element.getValue(el).length/30); el.rows=(newrows>0) ? newrows : 1; } </script> <textarea style="font-size:14px;font-family:Lucida Grande, Arial, Helvetica, sans-serif" id="description" rows="1" cols="30"
0
1363
by: jojobar | last post by:
We are using the ASP:Menu control (horizontal) for site navigation. The menu is contained by a table with css styles that allows us to give the illusion of a menu bar that runs the entire width of the page. This table also has additional right aligned cells on the same row for such things as logging out. When the child menu items are displayed by the mouse hovering over a menu item, the width of the web page is apparently increasing,...
2
1850
by: Greg | last post by:
I wonder if someone would help me and take a look at a strange problem I'm facing with a webpage I'm building. The page is at http://author.www.purdue.edu/swo/test.html. By using Internet Explorer v6, you will see the problem I'm having (so far I've tested this page only in IEv6, FF2 and IE7). If you click on the navigation menu on the left side (Alcohol, Tobacco & Other Drugs, General Wellness, Nutrition, etc.), the menus expand. ...
0
7946
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
8374
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...
1
8009
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8240
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
6661
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...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3867
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2389
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

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.