How to print a dynamic message in a <div> tag using Javascript?
<p>I have a message "I have 3 tries left", in this message "3" is dynamic and by default my <code>&lt;div&gt;</code> tag is set to <em><code>style="display:none"</code></em> : </p>

<pre><code>&lt;div id="triesleft" style="display:none"&gt;&lt;/div&gt;
</code></pre>

<p>I am looking for a way to display the above message in a <code>&lt;div&gt;</code> dynamically on onchange event of a select box..</p>

<p>I tried with this</p>

<pre><code>function triesleftfunc()
{
    var size = document.getElementById('size').value.split('x');
    var sizesqft = size[0]*size[1];
    var trial = document.getElementbyId(tires).value;
    if(sizesqft &gt;= 50 &amp;&amp; document.getElementById('options').value == 'Stiched Finish')
    {
        document.getElementById('triesleft').innerHTML = "I have "+trial+" tries left";
        document.getElementById('triesleft').display = "block";

        document.getElementById('options').focus();
        return false;
    }
}
</code></pre>

<p>NOTE I dont need alert Box it looks BAD BAD ....</p>
