Javascript execution order

Posted by zaf on Stack Overflow See other posts from Stack Overflow or by zaf
Published on 2010-04-01T11:37:56Z Indexed on 2010/04/01 11:43 UTC
Read the original article Hit count: 565

Filed under:
|
|
|

I want to give a static javascript block of code to a html template designer, which can be:

  • either inline or external or both
  • used once or more in the html template

and each block can determine its position in the template relative to the other javascript code blocks.

An example could be image banners served using javascript. I give code to template designer who places it in two places, once for a horizontal banner in the header and once for a vertical banner. The same code runs in both blocks but knowing their positions can determine if to serve a horizontal or a vertical image banner.

Make sense?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html