| 
	
 | 
 Posted by Nick D on 06/19/33 11:57 
Yes, If javascript is disabled there will be no change to the page and 
the original href="actionpage.html" link will be executed. But if 
javascript is enabled then the onload will run thus removing all 
original conventional href locations and replacing them with javascript 
actions. Here is a more precise example you were probably looking for. 
For accessibility degradable javascript is the way to go. 
 
http://particletree.com/features/the-hows-and-whys-of-degradable-ajax/ 
 
william.clarke wrote: 
> Nick D wrote: 
> > All of the examples in this thread are depreciated. None of them will 
> > degrade gracefully. You should ALWAYS use the (<a 
> > href="action_page.html">Link</a>) Then attach an onload javascript 
> > function that will run through all link tags and add the proper onclick 
> > event and removing the traditional "href" properties. This way your 
> > script will ALWAYS work even if javascript is disabled. 
> > 
> > Reference: http://www.w3.org/TR/WCAG10-HTML-TECHS/ 
> 
> Funny, not one of the examples in the Links section of that document 
> showed anything that resembled the issue that is being discussed here. 
> (ie. no examples of how the accessibility standard can be applied to 
> <a> javascript.) 
> 
> >Then attach an onload javascript function that will run through all link tags and add the >proper onclick event and removing the traditional "href" properties. 
> >This way your script will ALWAYS work even if javascript is disabled. 
> 
> How can that be true? If Javascript is disabled then Javascript is 
> disabled, just adding "onload" Javascript won't get around that. Maybe 
> I'm missing something there, but I always thought that if Javascript is 
> disabled, then no Javascript at all would run. Can someone clarify this?
 
  
Navigation:
[Reply to this message] 
 |