How to find sibling tag using javascript
<p>I have the following HTML</p>

<pre><code>            &lt;div&gt;
                &lt;label for="username"&gt;Username:&lt;/label&gt;
                &lt;input type="text" name="username" id="username" /&gt;
                &lt;span&gt;some text here&lt;/span&gt;
            &lt;/div&gt;
</code></pre>

<p>now I have referenced the input "username" in javaScript using getElementById rather easily but I need to locate (via javascript) the text of the label associated with the input, I'm thinking something like this: </p>

<blockquote>
  <p>document.getElement(thisName).parent.getElementsByTagName('label')[0].innerHTML;</p>
</blockquote>

<p>Any help is appreciated</p>
