Web Authors Tips - ‘Digg this’ Button doesn’t work

[This article is aimed at authors of internet content who have limited technical knowledge.]

Digg.com offers publishers and writers a variety code-snippets that can be included in your web content to encourage readers to submit (or digg) their content on Digg.

However, most of the link methods that they provide rely upon the use of JavaScript in order to function properly.

The use of JavaScript can cause some confusion if you are using a CMS (Content Management System), such as Wordspress, to publish and promote your articles.

You might, for example, include some JavaScript code into your blog post, press submit and, upon inspection, discover that it is not working as you expect.

  • One common reason why it does not work is because you may have tried to drop the code snippet into a ‘WYSIWYG editor’ as opposed to a ‘code editor’. In which case, try switching to the ‘code editor mode’ (click on the ‘code tab’) and paste your snippet there. This may or may not be be possible. It depends on your CMS and settings.
  • Another common reason why these kind of buttons don’t work is because the JavaScript, that you dropped in, was automatically removed upon submission of the form.

Why is JavaScript Code Getting Removed from My Posts?

Many internet hosting companies, blog writing services and IT departments have purposefully set-up their content management systems to strip-out any JavaScript content that has been submitted by authors.

This is a very sensible security measure. JavaScript is not inherently bad. But, it is powerful. And, for that reason, it is not wise to let a JavaScript script run on your user’s computers unless you know exactly what it will be doing. By simply publishing a JavaScript script (or a link to an external JavaScript) on your website you are, in effect, letting it loose on your visitor’s machines.

Each time they visit your website, your users put their trust in YOU, the publisher, and YOU, the author, to not do anything nasty to their computers. Therefore, it is your responsibility to know what you are doing before you go sticking any-old-JavaScript into your web pages.

Now its not all doom and gloom. Obviously JavaScript can be used to do amazing things and sites like Digg.com take extreme care to ensure that the code-snippets they offer are scrutinized for security holes. But, often, your boss/IT department/hosting company would prefer to leave nothing to chance. Hence, JavaScript is often removed from any content that you submit.

Yeah - thanks for the lecture, clever clogs! But, how can I add the ‘Digg this’ button to my article without Javascript?

I’m glad you asked.

  • First off: Speak to your techy people or look up the documentation that comes with your CMS.
    Digg is so popular that software developers have probably found a way to let you add these kind of social bookmarking buttons to your articles in a safe manner.
  • Alternatively you could follow the instructions on the Digg website about how to add a ‘Custom Submission-Only Button’ to your article.

Feel Free Add Your Questions and Comments Below

Leave a Reply