javascript conditions on input in forms
<p>So this is my code:</p>

<pre><code>&lt;html&gt;

&lt;body&gt;

&lt;p&gt;13-7: &lt;input id="answer" type="text"" /&gt;&lt;button onclick="check(6, bla)"&gt;Tjek!&lt;/button&gt;&lt;/p&gt;
&lt;p id="bla"&gt;&lt;/p&gt;
&lt;p&gt;20-7: &lt;input id="answer" type="text"" /&gt;&lt;button onclick="check(13, bla2)"&gt;Tjek!&lt;/button&gt;&lt;/p&gt;
&lt;p id="bla2"&gt;&lt;/p&gt;



&lt;script type="text/javascript"&gt;

function check(svar, ud)
{
var answer,vurdering;
answer=document.getElementById("answer").value;
vurdering=(answer==svar)?"Correct":"Wrong";
document.getElementById('ud').innerHTML=vurdering;
}

&lt;/script&gt;

&lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>When I click the button, I think it should display wether the input was or wasn't equal to the answer (svar). But when inserting 'ud' in the getElementById() instead of the paragraph id, it wont display whether the input was correct or wrong. any advice?</p>
