SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This function is then used throughout the page for various reasons. Usually it appears as the first line in other java-script functions.

As an example:

function toggleBlockOn(elementID) {
      if (document.getElementById(elementID).style.backgroundImage != "") {

The main interest here is the syntax of that first line. How does that work?

share|improve this question
up vote 1 down vote accepted

Yes, I answered a question on this on Stack Overflow not long ago. Its a debugging/tracing thing.

share|improve this answer
to say the truth there is also a similar question here on SharePoint overflow. Nice that you also post here, gived me the opportunity to thank you again for the info (you may had noticed that I linked your answer in that question). – SPArchaeologist Nov 9 '11 at 9:08
@SPArchaeologist LOL Nice! Thanks for the credit :-) – Paul Lucas Nov 9 '11 at 10:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.