can anyone see anything wrong with this js / jQuery?
<p>I have the following script to ask the user to confirm clicking a button depending on a system setting.</p>

<p>The system setting is stored in a hidden field set from code behind.</p>

<p>Markup:</p>

<pre><code>&lt;asp:HiddenField ID="hfConfirmOnApproval" runat="server" Value="False" /&gt;
</code></pre>

<p>cs:</p>

<pre><code>//Read the confirm on approval setting
hfConfirmOnApproval.Value = Objects.Engine.Settings.Instance.ConfirmOnApproval.ToString();
</code></pre>

<p>js:</p>

<pre><code>//Get whether to confirm on approval
var _confirmOnApproval = new Boolean($('#hfConfirmOnApproval').val());

if ( _confirmOnApproval ? confirm('Are you sure you want to approve this item?') : true ) 
{

    // do work

}
</code></pre>

<p>The problem is that the confirm message box is being displayed even though _confirmOnApproval is set to false?</p>

<p>I only want the message box to appear if its set to true.</p>

<p>The _ConfirmOnApproval is false at the moment</p>

<p>SOLUTION:</p>

<p>js:</p>

<pre><code>var _confirmOnApproval = $('#&lt;%=hfConfirmOnApproval.ClientID %&gt;').val() == "True" ? true : false;

if ( _confirmOnApproval  ? confirm('Are you sure you want to approve this item?') : true ) {
//Do work
}
</code></pre>
