If you have something like so:
HTML Code:
<div id="mastslides">
<script type="text/javascript" src="http://www.eurovisionltd.co.nz/common/fadeslideshow.js">
/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
new fadeshow(fadeimages, 184, 194, 1, 5000, 1)
</script>
</div>
The functions in the external javascript file are not available to the javascript code on the page which, technically, should never get executed because the contents of the script is the source file of the tag. A comment can go there because comments aren't required for execution.
Now, a javascript cannot function if javascript is absent or disabled. It is the opinion of some that the best scripts will degrade gracefully in such situations, showing the non-javascript enabled browser alternate content. I disagree with this idea, not in principal but, in practice. The principal is sound but, the javascript developer cannot anticipate all of the particular purposes to which the script will be put. Therefore, just how to 'gracefully degrade' in any given situation is beyond the scope of the developer. It is the designer of the page who should, in my view, take matters into their own hands and include a content specific fall back for non-javascript browsers. In this particular case, a <noscript></noscript> tag should be able to accomplish your stated goal:
HTML Code:
<div id="mastslides">
<noscript><img alt="product image" src="http://www.eurovisionltd.co.nz/revolv_imgs/img1.jpg"></noscript>
<script type="text/javascript">
new fadeshow(fadeimages, 184, 194, 1, 5000, 1)
</script>
</div>
Another acceptable alternative would be:
HTML Code:
<div id="mastslides">
<noscript>A Javascript Slide Show would appear here if your browser had javascript enabled and supported it.</noscript>
<script type="text/javascript">
new fadeshow(fadeimages, 184, 194, 1, 5000, 1)
</script>
</div>
Simply having nothing there at all for the javascript disabled browser isn't too bad either. So, you see from my point of view, it is really up to the designer.
Bookmarks