Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:00

Is new menu WC3 XHTML Compliant?


Poster: jamjam
Dated: Wednesday October 29 2003 - 18:55:53 GMT

I have to keep my pages validated: http://validator.w3.org/ and the new menu is giving me some xhtml errors.

Should it be going through smoothly or should I be tinkering some more?

Julie
http://www.uua.org


Poster: John
Dated: Wednesday October 29 2003 - 19:13:40 GMT

Exactly what errors are you getting?

We are trying to be compliant and assessable as well. Tough, sometimes, but we try.

Thanks.


Poster: jamjam
Dated: Wednesday October 29 2003 - 19:35:38 GMT

Hi John,

You are so fast!

Too many errors to list here but you can take a look at one the reports:
http://validator.w3.org/check?uri=http% ... ww.uua.org

I thought adding quotes in certain spots (text="javascript" etc) was the key but that rendered the menu null and void :)

Julie


Poster: John
Dated: Wednesday October 29 2003 - 19:41:33 GMT

Ah, HA :!: I see some errors of your own in there. Was worried it was only us... :roll:

As for the JS call errors, I have done this on my sites, and I think somebody mentioned it here on the board as well. Put the JS statements in the menu calls into their own file and get them with an include. That way you can get rid of all the 'funny stuff' in there and make them look like normal JS statements.

That make any sense?


Poster: jamjam
Dated: Wednesday October 29 2003 - 19:50:19 GMT

ahh there are some errors - my co-worker not me :)

As it stands no the JS errors are in an include, not by themselves, but an include nonetheless. I'll try it and search around the menu board some more.

Thank you!

Julie


Poster: John
Dated: Wednesday October 29 2003 - 20:04:57 GMT

Here's the one I was thinking about...
Quote:
The following is not XHTML compliant. Although it may not be considered a "bug", I thought I would raise the issue again.

<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>

My workaround has been to call this sciprt in a separate .js file. Please refer to
http://www.dracoblu.com

Not sure if he ran it through the validator, however.


Poster: Maz
Dated: Wednesday October 29 2003 - 21:27:17 GMT

I posted the CDATA method in the final bug section, I got W3 validation perfect.

Regards,
maz


Poster: John
Dated: Wednesday October 29 2003 - 21:52:55 GMT

Thanks, Maz. Hopefully it will help Julie...
Code:
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>   
<script language=JavaScript  type="text/javascript">
//<![CDATA[
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");       
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
//]]>
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>

Were you using it as an include, or directly in your HTML?


Poster: Maz
Dated: Wednesday October 29 2003 - 23:03:13 GMT

Its on my template below body. Any script on an xhtml page must have the CDATA.

Regards
maz


Poster: Hergio
Dated: Thursday October 30 2003 - 21:23:58 GMT

If you guys don't mind my asking, what exactly is the point of this compliance? Does it help things render better? faster? Or is it a way to get everyone on the same pages to that future versions of web scripting languages and browsers can work better together? Kinda wet behind the ears on this topic...


Poster: John
Dated: Thursday October 30 2003 - 21:59:29 GMT

Basically it's writing code to conform to the W3C standards, Dave. They make the rules, as you know, so might as well follow them. Compliance should make things run better. In fact, as you move 'up' the ladder (HTML - XHTML - XML, etc.), things start going wrong a lot faster if you are not in compliance. But until the browsers decide to get in line it's still going to be a battle.

You can run your code through their checker at http://validator.w3.org/.