DOM Problems

K

kendalk08

This post is for those struggling to figure out why there Drop Down
Menus and other scripts are not working using th DOM.

There are slight DOM problems with ONMOUSEOVER and ONMOUSEOUT events
of parent and child elements. When the child element fires its
ONMOUSEOVER event it also fires the ONMMOUSEOUT event. When this
happens you get a canceling of script (Like using timers for
instance). Because of this you have to check to make sure you are
still in the parent element to keep its ONMOUSEOUT event from firing.

For more information on this topic view: http://www.faqts.com/knowledge_base/view.phtml/aid/1606.

To view a site that is using this script go here:
http://www.nwtechonline.com/~kendalk07a/alvaschools/index2.html.
To view the non-working site with almost the same script go here:
http://www.nwtechonline.com/~kendalk07a/alvaschools/index2.html.

Kendal Knabe
 
K

kendalk08

David Mark said the following on 12/10/2007 11:16 AM:
It is worth noting that your primary navigation interface is unusable
without a mouse.

It is unusable without a pointing device. A mouse isn't the only
pointing device available.
It also breaks completely when scripting is disabled.

People who disable scripting (after they figure out how) remind me of
Netscape 4 users.
You might as well have used CSS menus.

Yeah, we know you can't disable CSS, right?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/

I know of the limitations of this effect. My menu is not in the
question. This was just a post to help those struggling with the same
issue I was The DOM, because I have seen several places that that was
the issue.
 
D

David Mark

David Mark said the following on 12/10/2007 11:16 AM:
It is worth noting that your primary navigation interface is unusable
without a mouse.

It is unusable without a pointing device. A mouse isn't the only
pointing device available.
Right.
It also breaks completely when scripting is disabled.

People who disable scripting (after they figure out how) remind me of
Netscape 4 users.

Some people don't have a choice and some agents don't feature
scripting at all.
Yeah, we know you can't disable CSS, right?

I am not advocating CSS-only menus. But when CSS is disabled, the
links used to make up the menus should still work. So it would be
slightly better than the OP's current approach, where disabling JS
results in dead links.
 
K

kendalk08

kendalk08 said the following on 12/10/2007 11:58 AM:


David Mark said the following on 12/10/2007 11:16 AM:
[snip]
To view a site that is using this script go here:http://www.nwtechonline.com/~kendalk07a/alvaschools/index2.html.
It is worth noting that your primary navigation interface is unusable
without a mouse.
It is unusable without a pointing device. A mouse isn't the only
pointing device available.
It also breaks completely when scripting is disabled.
People who disable scripting (after they figure out how) remind me of
Netscape 4 users.
You might as well have used CSS menus.
Yeah, we know you can't disable CSS, right?

I know of the limitations of this effect.

I didn't say anything about that.
My menu is not in the question.

Anything you post is open to be discussed.
This was just a post to help those struggling with the same
issue I was The DOM, because I have seen several places that that was
the issue.

Perhaps you wanted to reply to David and not me as David is the one that
mentioned your script, not me.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/

Sorry about that. I didn't mean for that message to be for you. I
would use a css menu except that someone that doesn't know anything
about HTML, Javascript, etc. can not change the menu. In Javascript i
can make it simple for someone that doesn't know coding to change the
menu. The original menu I worked off of is http://www.alvaschools.com/.
It is also Javascript.
 
D

David Mark

kendalk08 wrote:
[snip]
Sorry about that. I didn't mean for that message to be for you. I
would use a css menu except that someone that doesn't know anything
about HTML, Javascript, etc. can not change the menu. In Javascript i

It seems to me that you wouldn't have to know JS to update the content
of an HTML page. As far as CSS menus go, you wouldn't have to do
anything but update the markup. Someone who is unable to update HTML
markup is probably not the best candidate to work on your pages.
can make it simple for someone that doesn't know coding to change the
menu. The original menu I worked off of is http://www.alvaschools.com/.
It is also Javascript.

When you turn off JavaScript, the entire menu disappears and is
replaced by the message: "Your browser does not support script."
That's what users of aural (or text-based) browsers will first hear
(or see) on entering your page. Furthermore, keyboard users cannot
navigate your site, even with JavaScript. Suffice to say that
whomever was responsible for the original menu did not know what they
were doing. It follows that you shouldn't have replicated their
effort. You would have been better off using the example I gave you
in the previous thread about your menus.
 
K

kendalk08

The thought of someone modifying Javascript code that doesn't know
anything about Javascript and/or HTML is a worrisome thought. Especially
the code in the alvaschools site. Are they supposed to be able to know
what HighSubBgColor is supposed to do? The comment says:

Background color when mouse is over on subs

Hell, that confuses *me* and I know what it is.

Just curious, but what are BeforeStart, AfterBuild, BeforeFirstOpen and
AfterCloseAll supposed to be for? They don't do anything.

That is not my coding that is from the original site. I don't know
exactly what everything is in that script because I didn't build it.
That site was but up before I became the webmaster.
It is equally trivial to allow them to modify a CSS driven menu.
I would dare say it is a lot easier.


I think that before you start trying to make things "easier" on the
editors, you should understand what it is that you are trying to make
"easier".

Let me show you a bit of the programming involved in this script (also
remember this is a known array to the user I am creating for) ... :

// Menu tree
// MenuX=new Array(Text to show, Link, number of sub elements, height,
width);

Menu1=new Array("About Us","",10,20,150); <-- This is the only thing
you have to change... point blank.

Now tell me that isn't easier to change IFF you don't know any coding
period.


Also to David... Sorry but if you do not like Javascript Why in the
hell do you post in a javascript forum... If Javascript is turned off
on the majority of computers then there wouldn't be a need for this
forum now would there? Because everyone wouldn't have a need to learn
Javascript.

Also if you have a client that wants you to build their page, but
that is it. They want to update it themselves. Tell me which is the
way to go: 1. Not knowing HTML, but needs to change the menu slightly
(add a new item, etc.) OR 2. Not knowing HTML and JAVASCRIPT and
edtiting this:

// Menu tree
// MenuX=new Array(Text to show, Link, number of sub elements, height,
width);
Menu1=new Array("About Us","",10,20,150);


David I have a few questions. How old are you? How long have you
worked in Javascript professionally? Do do you dislike Javascript and
think that CSS can do the same things as Javascript? Cause let me tell
you it can't.
 
D

David Mark

That is not my coding that is from the original site. I don't know
exactly what everything is in that script because I didn't build it.
That site was but up before I became the webmaster.




Let me show you a bit of the programming involved in this script (also
remember this is a known array to the user I am creating for) ... :

// Menu tree
// MenuX=new Array(Text to show, Link, number of sub elements, height,
width);

Menu1=new Array("About Us","",10,20,150); <-- This is the only thing
you have to change... point blank.

Which is arguably more complicated than changing the markup.
Now tell me that isn't easier to change IFF you don't know any coding
period.

It isn't.
Also to David... Sorry but if you do not like Javascript Why in the
hell do you post in a javascript forum... If Javascript is

Who said I don't like JavaScript?

turned off
on the majority of computers then there wouldn't be a need for this

That is irrelevant.
forum now would there? Because everyone wouldn't have a need to learn
Javascript.

That makes no sense.
Also if you have a client that wants you to build their page, but
that is it. They want to update it themselves. Tell me which is the
way to go: 1. Not knowing HTML, but needs to change the menu slightly
(add a new item, etc.) OR 2. Not knowing HTML and JAVASCRIPT and
edtiting this:

// Menu tree
// MenuX=new Array(Text to show, Link, number of sub elements, height,
width);
Menu1=new Array("About Us","",10,20,150);

If they don't know HTML and "JAVASCRIPT", then they certainly
shouldn't be editing that.
David I have a few questions. How old are you? How long have you

None of your business.
worked in Javascript professionally? Do do you dislike Javascript and
think that CSS can do the same things as Javascript? Cause let me tell
you it can't.

You have missed my point(s) completely. I'm the one that told you in
the first place that CSS menus were inaccessible and not a good idea.
Go back and re-read the first thread about your menus. My point here
is that you botched your JavaScript menus so badly, despite being
pointed to a much better example than the one you chose to copy, that
you might as well have used CSS menus. You created something that is
even less accessible.
 
T

Thomas 'PointedEars' Lahn

Randy said:
David Mark said the following on 12/10/2007 11:16 AM:

People who disable scripting (after they figure out how) remind me of
Netscape 4 users.

I have said it before: people may not have the choice. IOW, they may not
need to do anything to their user agent for it not to support client-side
scripting (fully). That includes, but is not limited to, UAs that don't
provide the support in the first place.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top