Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

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.