Click to See Complete Forum and Search --> : dropdown menu script fails DTD?


khaki
04-16-2003, 12:23 PM
okay... so I have just been psuedo-promoted (which means "better status" but "no raise" lol) into a new department, and I figured that I would try to be as compliant as possible right from the beginning.

3 days-in... I get a request for something that would use a new version of my (now famous) javascript drop-down menu ...
which I originally rifled from:
http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm

...and I notice that it ceases to function (or even appear) if the following (now necessary) DTD is inserted on the same page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

:eek:

I understand that a javascript-generated menu will fail for 1 of every 10 users (yadda, yadda, yadda :rolleyes: )...
but this menu will be on an intranet with a target audience of about 125 javascript-enabled mouse users with no known disabilities (I actually inquired :) )... so I thought that we could use it (as per the user's request).

But... if this menu is completely off-the-map and will not cause a favorable valaidation check... then screw it! (ooh. sorry... i'm gettin a little agitated i guess).

Anyway...
Is this menu truly not compliant with that DTD... or am I missing something?
And if it is... do all javascript menus also fail for the same reason?

Does anyone know the answer to that?

may need to re-learn and un-learn again :eek: ...
;) k

khalidali63
04-16-2003, 01:03 PM
This simply means that you are trying to validate your code strict standards of the w3c for xhtml,
Look at the dtd URi and try to cchange the strict to loose.dtd.it may temporarily solve the problem.

To be compliant,
1 first look at the document and make sure all the element names are in lowercase,
2. all the atributes have lowercase
3. Attribute value must be enclosed in qoutes
4.every element must have a closing tag for it
e.g
<head></head> and empty tag will look like this
<br/>

I hope this will get you started

Cheers

Khalid

khaki
04-16-2003, 02:23 PM
thanks Khalid... but I went ahead and convinced them to forget about using a dropdown menu...
(valid or otherwise... although I'd still like to know for sure :rolleyes: )

so instead we are going with the new CSS-generated mouse-over menu that I have fallen in love with
(and the first page tests as: This Page Is Valid HTML 4.01 Strict!... so that's always a sweet sign!).

I promised myself that I would try to wean myself away from the javascript generated menus... but I'm working with some new people now... and they like some of the "fancy" stuff that I've done in the past.

Unfortunately for them... khaki has found "religion" (in the form of "w3c specs") over the past few months (since committing to CSS), so "non-essential fancy" is becoming less of an option in my work.
(and it feels good!).

Anyway... if anyone can definitively tell me if javascript-generated menus will always fail the referenced DTD, I'd appreciate it.
Otherwise... this thread is pretty dead (it fell on it's head...use CSS instead. LOL! :) )...

maybe feeling a little too good... (nah!)
;) k

khalidali63
04-16-2003, 02:40 PM
It will be really interesting to see pure 100% CSS menu or anything for that matter,Please is it possible for you to post a url for such a menu or may be code.I'd like to see
Thanks K.
Khalid

khaki
04-16-2003, 03:18 PM
Hi Khalid...

I'll just lead you to a link in another thread for that.

http://forums.webdeveloper.com/showthread.php?s=&threadid=7308

The CSS menu is there... about 3/4 of the way down (maybe lower).

It eliminates the javascript rollover/mouseover thing. It's just a basic menu actually... but free of javascript :eek: .

will do anything to avoid the enemy (javascript)... lol...
;) k

khalidali63
04-16-2003, 03:36 PM
:D ....

Sometimes simplest things are hardest to comprehend...lol

Thanks

Cheers

Khalid

khaki
04-16-2003, 03:40 PM
Sometimes simplest things are hardest to comprehendhey... that's what my friends say about me!


needs new friends...
;) k