Reply to Re: stopping <a> from loading new page but still performing onclick action

Your name:

Reply:


Posted by Nick D on 12/16/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?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация