Non.JS browsers

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
gregorr
Advanced
Advanced
Posts: 10
Joined: Mon Apr 21, 2003 9:38 am

Non.JS browsers

Post by gregorr »

Is there any way to "wrap" the JavaScript milonic menu code so that folks with non JS browsers can see at least a static menu of sorts?

Thx
R
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi R,

Short answer: No. If a site visitor disables js, the menus can't run. You could provide a <noscript> block that would take the visitor to another page, where you have static links to the various sections in your site (this is also a good approach to make sure your pages are catalogued by search engines).

Kevin
gregorr
Advanced
Advanced
Posts: 10
Joined: Mon Apr 21, 2003 9:38 am

Post by gregorr »

Do you have an example for me of how to use the <noscript> tag?
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

I don't really have an example. If you do a web search for <noscript> you should be able to find many examples and discussions. The general idea is that if someone's browser understands the script tag, then it will do what ever is specified in the tag. I the site visitor is using a browser that doesn't understand javascript or if they have javascript turned off, then the browser should skip the script tag and do what's in the noscript tag. Your code might look something like:

Code: Select all

<script language=JavaScript src="menu_array.js" type=text/javascript></script>
<script language=JavaScript src="mmenu.js" type=text/javascript></script>
<noscript>Your browser does not recognize javascript or you have javascript disabled in your browser, so the javascript-based menus used to navigate this site will not function.  Please <a href="noscript_page.html">click here</a> to go to a page with non-javascript navigation for this site.</noscript>
You would replace "noscript_page.html" with a url to a navigation page where you have standard links to the main pages in your site. The user would click that link to go to a page that they could navigate your site from. Alternatively, you could place all of the appropriate links in the noscript block itself, but then it might be a large set of links and you might have difficulty placing it so that they are well integrated into your normal page layout; using a separate page might be a better way to go.

Hope that helps,

Kevin
gregorr
Advanced
Advanced
Posts: 10
Joined: Mon Apr 21, 2003 9:38 am

Post by gregorr »

Sounds like just what I was afraid of... I need 2 of every page on every site so I can accomadate .JS enabled browsers AND non-.JS enabled browsers to see every page.

Worse, the noscript pages need to be edits one at a time seprately to change tyhe menu onm them as there is no central menu to edit once for all pages on the site as Milonic does.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Gregorr,
I need 2 of every page

Well... I didn't say that you'd need two of every page. You certainly could do it that way, but I think you only really need one additional page; sort of a site map. You might even want one of those anyway; people who could use the menus might find it useful, people who can't use the menus (noscript) would use it to navigate, and it would allow web crawling search engines to spider your site more completely (if the menus are the only navigation you have, I think most spiders will not find most of you pages, because most of them do not read js). You might place a link or button at the bottom of each page that goes to your site map page, then use the noscript tag to inform the non-script people that they should use the "Site Map" link or button at the bottom of each page to navigate.
Worse, the noscript pages need to be edits one at a time seprately to change tyhe menu onm them as there is no central menu to edit once for all pages on the site as Milonic does.
I'm not sure what you mean here. You can certainly have one central menu for your site; that's how most people use the Milonic Menus. Maybe I misunderstood your point.

Kevin
gregorr
Advanced
Advanced
Posts: 10
Joined: Mon Apr 21, 2003 9:38 am

Post by gregorr »

I meant if text nav menus were on every page then every time there was a change I'd have to edit each page. This is what I wanted to get away from with the Milonic menus.

You are right though that if only the front page has full text nav menus then folks w/o JS support would have to hit BACK to nav the whole site but at least they (and the search engines) could still see everything, though not as easily! I assume non-JS browsers are (very much?) in the minority, but still, who wants to ignore ANY part of the population!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

I wouldn't even put the full text on the front page; it might mess up the layout that your probably work hard to achieve. I'd just provide a link to the text-only nav page. Then they could use their Back button to get back to it, or you could also use a noscript tag at the bottom of every page to provide a link to the text-only nav page for those few who do not or will not have js support.

Kevin
Post Reply