javascript code to hide
<p>I'm trying to write javascript code where there is an object called "costCenter" which the visibility should be false. but when i click on the "computer" item on my dropdownlist it will set the "costcenter" visibility to true.</p>

<p>so far this is what i have. is this the proper use of syntax for javascript?</p>

<pre><code>function hideMe()
{
var g = document.getElementById('costcenterid');
var e = document.getElementById('dg_form_ctl02_DropDownList1');
if(e == 'computer')
{
g.style.display = 'block';
else
g.style.display = 'none';
}
}
</code></pre>

<p>C# code behind</p>

<pre><code>ClientScript.RegisterStartupScript(GetType(),"hwa","hideMe();",true);
</code></pre>

<p>i found this code from somewhere, but i'm not sure what goes in the "hwa"</p>
