I'm working on asp.net and want to execute following javascript code. I'm using VS2010.
<title></title>
<script type="text/javascript">
function myClosure() {
var canyousee = "here I'm ";
return (function theClosure() {
return { canyouseeIt: canyousee ? "yes" : "no" };
});
}
var closure = myClosure();
closure().canyouseeIt;
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="myClosure();" />
</div>
How do i execute function myClosure()
on button click so that It gives me confirm
i.e popup for yes
or no
?
- Which code I need to put for
confirm
? - How can I execute it on
Button Click
?
thanks