Say I have an element containing some text that I'd like to make available for printing:

With this JavaScript function I can print the contents of the (selected) div tag.

So, with jQuery I can retrieve the div's content and print it:

That's it!

Important: Remember that for the PrintSelected() function to work well in IE, the window name (second param) needs to have no spaces in it, otherwise it'll chock and the popup window won't open...

This is good:

This is bad:

It's really annoying to find websites that have the words "click here" to link to other pages... And is very bothersome to find people or companies that use this bad linking practice because 'other people/companies do it and it works for them' ... WHAT?? To me, that's just a lame excuse.

If you're gonna follow the example of other people (to do what has worked for them), can't you have the 'imagination' to at least improve it, and hence, make it better? Do you have to make it the 'same' way because 'if it has worked for them, it will work for you"? BAH!

It is my personal opinion that there is nothing wrong to follow good examples, but it would be a better idea to discard the bad ones and, like I said, make it better.

There is a very useful article that explains why "click here" is a bad linking practice. Some of points of why it is a bad practice are:

  • "Click here" just looks stupid.
  • "Click here" looks especially stupid when printed on paper.
  • "Click here" is bad food for search engines.

The W3C (World Wide Web Consortium) has a QA tip called 'Don't say "click here" as link text'. It recommends that:

When calling the user to action, use brief but meaningful link text that:

  • provides some information when read out of context
  • explains what the link offers
  • doesn't talk about mechanics
  • is not a verb phrase

Also, the W3C in the HTML Techniques for Web Content Accessibility Guidelines 1.0, Section 6.1 Link text, explains:

Good link text should not be overly general; don't use "click here." Not only is this phrase device-dependent (it implies a pointing device) it says nothing about what is to be found if the link if followed. Instead of "click here", link text should indicate the nature of the link target, as in "more information about sea lions" or "text-only version of this page".

So, in conclusion, death to "click here" text link! >:D


You know what really makes me mad? EVERYTHING!!! - Ranting Swede

Rant originally posted on 20050810::0114

1

Basically, I'm going to repeat here part of what I wrote on the About page:

The approach I’m taking this time for my blog is quite different from its former version; this blog will be more for my personal use, in other words, I’ll use it to write programming/development notes (not articles) that I can reference to later and remind myself on how to do something; because of this, sometimes the notes will make sense only to me. That said, of course, if someone else finds my notes useful, well… that’s great!

There's a chance that I'll make available some of my old posts in PDF format in case someone finds them useful.

Cheers!