[thelist] Help with providing a backup to javascript solution

Jacob Reiff jacob at jaacob.com
Wed Jan 25 16:42:37 CST 2006


I've got an effect using prototype and script.aculo.us that I really  
like on this site, the problem is that I'm not sure how to provide a  
degradable solution for people with javascript disabled.

The site is: http://tinyurl.com/byzgd
The effect is when you click the red exclamation.

It shows two divs that are set via inline CSS to have display: none -  
when you click the div with the JS calls, it uses script.aculo.us's  
effect.appear to make them visible. Taking the appropriate action in  
the new div, or clicking the "close" button makes them disappear.

I have the JS calls currently on the div that contains the red  
exclamation image (I'd make it a background image and use IR, but  
it's a 24-bit PNG and it throws off the color) and use CSS to make  
the cursor appear like it's a link. There currently isn't an actual  
anchor link in the code.

My guess is that the best solution is to create an actual anchor  
around the image as well, but then disable the anchor via javascript  
somehow - that way if they have JS enabled, they get the prototype  
version, if they have it disabled, the link can spawn a popup with  
the same information in a small window.

Does anybody either know how to disable an anchor with javascript or  
have a better solution to this problem? Thanks for the help.



More information about the thelist mailing list