[ka-Map-users] TIP: Javascript Disabled / NOSCRIPT

Steve Walker walker at mfgis.com
Sun Jun 10 15:34:40 EDT 2007


Apology in advance if this has been discussed already....

Even after having built multiple sites using Ka-Map, I was at a loss to
discover why some new sites/pages would not display their maps.

Of course everything was fine on the server side, it was simply that my
browser's JavaScript was disabled.  If I, as a developer and webmaster am
confused by this, what must my users think when they reach one of my pages
only to discover a blank canvas?  They think my site is lame and move on
elswehere, that's what they think.

So here is a simple way to inform them that their browser must have
JavaScript enabled, using the HTML NOSCRIPT tag:

In each of my pages I include (right after the <body> tag): the following:

<div id="JSWarning">
<NOSCRIPT>
<img src"/images/javascript_required.jpg">
</NOSCRIPT>
</div>

and in the .css file:

#JSWarning
{
position:absolute;
left:300px;
top:300px;
width:500px;
height:400px;
}

This CSS positioning places the image somewhere in the middleish of my
page:  ie where the map *SHOULD* be.

Alternatively, I could have used the following:
<NOSCRIPT>
JavaScript Required!  Our maps are fully interactive, however in order to
use them your browswer must have JavaScript enabled.
</NOSCRIPT>

However, I chose to use an image to display the same message, as I didn't
want this text being caught by search engine crawlers.

You can grab a copy of the 'javascript_required.jpg' from:
http://usmapserver.com/images/javascript_required.jpg

If you wish to see the effect live, disable Javascript on *your* browswer
and visit http://usmapserver.com

I've seen sites which take this one step further, by overlaying a
semi-transparent grey image over the whole page, thus partially greying
out the complete content.  Others add instructions and/or links for
enabling JS on various browswers.

Hope this is of use!

-Steve
-- 
Steve Walker
Middle Fork Geographic Information Services
walker at mfgis.com
360-671-2505



More information about the ka-Map-users mailing list