title: Get text with id of textbox javascript
body: <p>I know, this is just so common. However, I am not able to get it working.</p>
  
  <p>Got a php file which is included in the index.php and that contains a function printing this one out</p>
  
  <pre><code>echo "&lt;input type=text id=test name=schuelername value=Name&gt;&lt;br&gt;
      &lt;button style='float: left;' onclick='update();'&gt;Suchen&lt;/button&gt;";
  </code></pre>
  
  <p>Now I want to pass this value of the textbox. With (this is the update function)</p>
  
  <pre><code>alert(window.document.getElementById("test").value);
  </code></pre>
  
  <p>run by an external JS file (that works, Tested it, the only problem is the value of the textbox) isn't showing up. </p>
  
  <p>Argh. Why do I define the damn ID if JS can't access it (or so...)</p>
  
  <p>SOLVED: Well, I ran a document.write before it and I couldn't imagine, that like this, the rest of the javascript can't run because I just deleted everything. Thanks alot, stupid me, late!</p>