Delete does not ask for confirmation
<p>When Delete button is clicked, the confirmation box should pop up if the selected node has child nodes. Otherwise, it should not do anything.</p>

<p>Right now, when I click on delete, it just deletes without confirming.</p>

<p>Here is the code:</p>

<pre><code>  &lt;asp:Button ID="btn_delete" runat="server" Height="32px" 
        onclick="btn_delete_Click"  OnClientClick = "return childnode();"                              
        Text="Delete" Visible="False"  /&gt;  

    &lt;script type="text/javascript"&gt;
        function childnode() {
            var treeViewData = window["&lt;%=nav_tree_items.ClientID%&gt;" + "_Data"];

            var selectedNode = document.getElementById(treeViewData.selectedNodeID.value);
            if (selectedNode.childNodes.length &gt; 0) {
                return confirm("heloo");
            }
            return false;
        }                                        
    &lt;/script&gt;
</code></pre>
