JavaScript links, or links with javascript in the href attribute, cause problems for visitors who either turn off or don’t have JavaScript support in their browsers. Not to be callous, but, in almost all cases, this percentage of your audience is small.

As a compromise, you can always use self-referential links that respond to onClick events. These links are easier for non-JavaScript browsers to handle, but then you have the problem of the browser jumping back to the top of the page. This inconveniences a larger cross-section of your audience than it helps.

If you really want to court the HTML purists, don’t use JavaScript on your site, period. However, if you want or need the extra functionality, JavaScript links work better than onClick links for the majority of your visitors.


4 Responses to “JavaScript Links or onClick Links?”  

  1. 1 Javascript Countdown Timer

    that’s all cool & great post to read, thank you very much for sharing.

  2. 2 web design company

    Thanks u r information

    its very useful

  3. 3 Ricardo Zerbe

    great post my friend, very nice. congrats!

  4. 4 physician assistant

    I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.

Leave a Reply


This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a




Sky Soft Consulting on Facebook