Running Script before/after Variables declared?

Posted by Sam on Stack Overflow See other posts from Stack Overflow or by Sam
Published on 2011-01-14T07:47:46Z Indexed on 2011/01/14 7:53 UTC
Read the original article Hit count: 285

Filed under:
|
|
|
|

Hi folks. As i understand javascript .js files are best to put all the way at the bottom of html pages, to speed up loading of rest of page. Advised by Yslow(Yahoo) and Page Speed(google).

Now, when in the middle of page some thing RUNS a javascript script, in Internet Explorer, i see a small warning message saying that the element is: Uncaught ReferenceError: SWFObject is not defined

When i put my all.js file in the had, the error goes away but page load slows doen. What to do?

Actually, i remember it was the same with php variables. If i RUN php but the variable comes later, then it just doesnt work. must define the variable first, for it to run.

How to make this workflow better, in case of php scripts? and in case of javsscripts?

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript