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?


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


  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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