473,326 Members | 2,175 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,326 software developers and data experts.

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:openMenu(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 1925

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.forum4designers.com>,
Mr*****************@mail.forum4designers.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 indistinguishable
from magic.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #3
"MrKillington" <Mr*****************@mail.forum4designers.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:openMenu(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.javescript 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.javascript 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.com present
comp.lang.javascript 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
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...
1
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()...
4
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...
2
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...
1
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...
1
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...
0
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...
2
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.