Posted by Nick D on 12/16/54 11:57
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/
Good Man wrote:
> "Nick D" <nick.denardis@gmail.com> wrote in
> news:1157393471.762756.201500@m79g2000cwm.googlegroups.com:
>
> > Sometimes this could cause a problem by jumping to the top of the
> > page. Another way to do this without making the page jump would be to
> > put (<a href="javascript:void(0)" onclick="SomeFunction()">)
>
> i usually call:
>
> <a href="javascript://Click To Change Divs" onclick="changeDiv();">
>
>
> i believe my example is proper coding practice - any href="javascript:xxx"
> should be avoided at all costs.
>
> best,
> gm
Navigation:
[Reply to this message]
|