javascript cannot read property 'style' of null
<p>This function is supposed to hide the patient note and show the next note (if they have another note)</p>

<pre class="lang-js prettyprint-override"><code>function nextNote(idno){
    document.getElementById(idno).style.display = 'none';
    var idno2 = parseInt(idno)+1;
    document.getElementById(idno2.toString()).style.display = 'inline';
    document.getElementById('prevNote').label = parseInt(document.getElementById('prevNote').label) + 1;
    document.getElementById('nextNote').label = parseInt(document.getElementById('nextNote').label) + 1;
</code></pre>

<p>Uncaught TypeError: Cannot read property 'style' of null at <code>"document.getElementById(idno).style.display = 'none';</code></p>

<p>The element in question
<code>&lt;li class="notes" label="1052" style="display: inline;" id="1"&gt;On: 5/17/2004 A real good Patient test&lt;/li&gt;</code></p>

<p>nextNote is being called by: <code>&lt;input type="button" id="nextNote" class="notesbottombutton" value="&gt;" label="1" onclick="nextNote(this.label);" /&gt;</code></p>

<p>If I use the Chrome javascript console
<code>document.getElementById(1).style.display;</code> I get: <code>"inline"</code></p>

<p>Note I will add checks to the function after I get it work such as if(document.getElementById(idno2.toString()) so that it doesn't do anything if there are no more notes to display, I am just trying to get the basic functionality first</p>
