Forum Moderators: open
kiwibrit: wroteI think it's a pretty good effort.
However, if I "click on slide show" form the home page, and have JavaScript disabled, I do not get a slide show, which might be confusing. How about having a "click to see portfolio" and a <noscript> text offering a hyperlink to a page with enlargeable thumbnails, for those with JavaScript disabled?
The general consensus is that it is better to code in strict code than transitional.
Hope that helps.
I thought the noscript hyperlink suggestion had some validity however I did not want to do it in that simple way since I thought having an extra noscript hyperlink offering would ruin the aesthetics of my design when it appeared. So I thought of the idea of using the JavaScript method I have half remembered of replacing HTML attributes with any value you like. I would replace the anchor tags "href" attribute to point to my JavaScript enabled timed slide changing slideshow if JavaScript was turned on and have the default links as the thumbnail gallery the above quote suggests I include in my site. Since I only half remembered the JavaScript that would do this I called for the assistance of an expert another site who would answer this question. I know this was the easy way out but I did it nonetheless. The response I got was a little disturbing. This expert gave me some code that would work not the method I remembered but code that would work nonetheless. However it came with the following warning and I quote.
Arch Stanton: wroteBe wary of this, due to abuse it might be blocked by pop-up blocking/anti-spyware/anti-fishing software. Maybe. But that would apply to any adjustment of a link's destination, not just this method. Maybe.
Mr. Arch Stanton Way of replacing links used the onclick event instead of the onload event I was thinking of using however that's no problem the problem is how to do it with out getting those spy ware pop-up blocker problems he mentioned. Can I do it with attribute replacement or the onclick event or writing JavaScript code to my page or how? I suppose I could live with an unsightly link that appears if script is turned off but I would like a better alternative. So please give me your ideas.
Sincerely
Marc
<a href="/no_javascript_needed_slideshow.html" onclick="initiateSlideShow();return false;">Slide Show</a>
If the have javascript enabled, the javascript function is called and the "return false" bit prevents the href from firing. If they don't have javascript enabled, then the onclick is ignored and the browser follows the href. You can even add in a target="_blank" if you want the slideshow to open in a new window for the non-javascript folks.