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:21

handling browsers with disabled javascripts?


Poster: WoodenCigars
Dated: Thursday December 15 2005 - 23:05:02 GMT

I have found that browsers that disable javascripts need alternates. I have found several methods to handle it. One, I studied how milonic handles it. I copied that approach using a link to an alternate menu page. I also want my code to validate. If I use a class=milonic
in a div tag, the javascript disabled browser reads the link to the alternate menu just fine. Javascript enabled browser ignore the link. In other words, it all works fine if I use the word milonic but it does not work if I use any other word as the class=???????? My question is this.
Why does this work? I don't have a class in my style sheet named milonic.
So it should not work. Do the milonic files running the menu have a reference to a class called milonic? The page that validates and works is located at http://woodencigars.com/timplut.html I want to use this as a template for my whole site, but don't want to do it if I am missing something. It seems like it should not work to me! I am stumped!
John Rogers :?


Poster: Ruth
Dated: Friday December 16 2005 - 4:24:49 GMT

Hi,

Actually it should work since it's something in the programming that has to do with that class. So, when the menu is working i.e. js is enabled, then whatever the programming is makes the div not show, if js is disabled then whatever that programming is doesn't work so the div shows, and it doesn't matter if you don't have a milonic class in your css.

Let's say you had a class called .MyClass, but that when you did the coding for the div you put in class=MyClas. What would happen? The div would still be there, it just wouldn't have whatever css was in MyClass applied to it.

Ruth


Poster: WoodenCigars
Dated: Friday December 16 2005 - 12:23:29 GMT

Thank you Ruth. I will experiment with your idea. I had a typo in the text in the original that I corrected. You did good to understand the question with the typo in there! I have been using the Milonic menu for quite awhile now and had no problems with it at all. It is great! But the counter on my alternate menu shows that I have had many visitors that did not have js enabled! Hence the search for an elegant solution to handle them.
John Rogers :D


Poster: vikenk
Dated: Friday December 16 2005 - 14:27:32 GMT

The style for the milonic div is actualy in the source code - the milonic_src.js file, I believe.

To handle non-javascript enabled browsers I make a separate, list-based menu and enclose it in <noscript> tags. This ensures that the menu will appear to non-javascript enabled browsers. Then there's no need to provide a link to a separate non-java page and have duplicate pages (unless, of course, you want it that way).

Also, and equally as important, it provides a way for Google to crawl your site and index the content much better. If you want to see how I've implemented it, go to a test-site I'm working on:

http://www.ssaes.org/test_site/

Use Firefox or Opera since it's easy to disable JavScript in those browsers. Look at the site, then turn off java and reload.

Viken K.


Poster: WoodenCigars
Dated: Friday December 16 2005 - 15:16:25 GMT

Viken K.
Thanks for pointing out where the class milonic is actually located.
Thank you very much for your help. I checked out how you do it and also validated your test page with w3c. It validates as strict. Great! That is what I want for my pages. I will have to study how you did it. When I use noscript tags I get an error on validation saying that noscript should be in a frameset. So I can learn from you.

My number one priority is to make the validated pages load fast!
So I move the non js menu to a separate page. That way js enabled browsers don't waste time reading two menus on every page. Reading two menus on every page seems like a poor approach to me. Most of my visitors have js enabled, so I don't want to slow them down reading the second menu that will only be ignored.

You brought up a point that I had not considered. Google search bots
don't read the links in the milonic menu? If that is the case, I guess the second menu becomes more important. I will have to research that.

I am pleased that this forum is so helpful.

John Rogers


Poster: Ruth
Dated: Friday December 16 2005 - 16:25:07 GMT

Hi,

The links are inside a js file, menu_data.js, so no, Google will not read that.

There is also a siteIndex Demo. This is a function created by Kevin which let's you put in a siteIndex into the menu itself which means it will always be up to date given it indexes the links you have in the menu_data.js file. Of course, if you have links you don't put in the menu file they wouldn't be generated in the site index page.

http://support.milonic.com/demos/site_index/index.htm

Ruth


Poster: vikenk
Dated: Friday December 16 2005 - 16:43:04 GMT

There's also a third option:

Milonic offers a list-based menu. You have to download the additional js file to make it work.

But basically, you put the list in the the page and the Menu reads the list and structures its self based on the list. The list is kept hidden until a non-js browser is used.

Download the lastest version of the menu and look in the "extras" folder. You will see the list-based folder. You can read the source code and figure it out. According to the Milonic disclaimer, it is still a work in progress, however.

Viken K.


Poster: WoodenCigars
Dated: Saturday December 17 2005 - 23:28:03 GMT

What a great forum for learning!
Between the two replies I had a lot to think over and investigate.
I created a page that validated html 4.01 strict and had my alternate menu on it within the <div class=milonic> tag and all worked fine. Then it struck me that if I moved my links to another page and used a link from the index page that Google should follow the link to the links on the alternate menu.
That way I accomplish both goals. One my pages don't have two menus, and Google should find the links on the alternate menu since it is linked from the main page. The link shows up for js disabled browsers and disappears for js enabled browsers. I guess the question now is this. Will Google follow to the alternate menu when their robot visits? Ruth do you know? And vikenK thank you for putting me onto the idea. I started by asking one question that seemed simple and ended up finding a wealth of information in the reply by Ruth and vikenK !
Thank you so much!
John Rogers


Poster: vikenk
Dated: Sunday December 18 2005 - 2:44:15 GMT

You're welcome. I'm always one to share knowledge :>)

I'm not a total expert on this, but believe that Google's crawlers don't care where your link is (in the <body>). Google just looks for hyperlinks, in the <body>, and follows them to wherever they go. So it doesn't matter if the links are in the <noscript> tag.

That's my understanding of it.

Viken K.


Poster: Ruth
Dated: Sunday December 18 2005 - 5:51:10 GMT

I believe that is the case. Of course you could also set up a sitemap page using a list menu or even just a text menu which would be good for everyone and a text link to it in the footer of your pages. I see that on a lot of sites. Since it's a small text link, it doesn't matter if they have js disabled or enabled, it will always be there for everyone and for the Search Engines.

Ruth


Poster: WoodenCigars
Dated: Sunday December 18 2005 - 12:32:24 GMT

Ruth,
javascript:emoticon(':D') I could just kiss you! Your help has been right on!
Pet that cat for me! I am so pleased with your suggestions. I did indeed put a link in my footer and titled it site map. It leads to the secondary menu. I also have a notice and link in the tag div class=milonic that leads to the secondary menu. As you stated, it will not matter if js is disabled or not because of the link in the footer. Search engines should find all links.
AND... the test page validates 4.01 strict! Happy day! The secondary menu also validates 4.01 strict. If you would like to see the pages, I now have the alterations on my main index page. http://woodencigars.com
Now I only have to alter about 80 more pages. Work Work Work. But since I am learning so much it makes it almost fun! I am a beginner at this web site creation business.
Merry Christmas!
John Rogers