title: Php calling javascript on load
body: <p>Guys i have little problem with PHP to call Javascript function on load ...
  Idea is when page load i do little calculation with PHP stuff , so when i finish that all i 
  want is to write that down in same DOM element using javascript.
  I will not show you PHP code for calculation as i am 100% sure it is alright.
  This is the code i got so far , so can you just tell me whats wrong with it?</p>
  
  <pre><code>$test = 100;
  echo "&lt;script language=javascript&gt; window.onload=UpdatePoints($test); &lt;/script&gt;";
  </code></pre>
  
  <p>and Javascript function is simple </p>
  
  <pre><code>function UpdatePoints(Points) {
  document.getElementById('PointsNumber').innerHTML = Points;
  }
  </code></pre>
  
  <p>Thanks in advance</p>