Hiding elements with javascript
<p>On button click, I want to hide the div. How do i do it?</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;
&lt;script language="javascript" type="text/javascript"&gt;
function button()
{
    var a = document.getElementById('approve');
    document.getElementById('p').innerHTML= 'Fred Flinstone';


}
&lt;/script&gt;

&lt;body&gt;
&lt;div id="hide"&gt;
&lt;form&gt;
&lt;p id="p"&gt;heya&lt;/p&gt;

&lt;input type="button" id='approve' value="approve" onclick="button()"/&gt;
&lt;input type="button" id="reject" value="reject"/&gt;
&lt;/form&gt;

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

<p>SORRY FOR ASKING AGAIN...BUT COULDN'T FIND A BETTER METHOD. THANKS</p>
