Oct 30, 2008, 9:32 AM
[FIXED] [V0.7] Bug on confirm event on button
Hi
When doing a return confirm on a button that has user parameters, the confirmation does not work. It does not matter if I press cancel or not. It always run the funcion
Please see code
Mikael Jürke
When doing a return confirm on a button that has user parameters, the confirmation does not work. It does not matter if I press cancel or not. It always run the funcion
Please see code
<script type="text/javascript">
function getValue(button)
{
return button.getText();
}
</script>
<script runat="server">
protected void TestEvent(object sender, AjaxEventArgs e)
{
Label1.SetText(e.UserParams["ButtonValue"]);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Confirm button BUG</title>
</head>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server" HideInDesign="false" />
<ext:Button OnClientClick="return confirm('Really?')" ID="btnConfirmButton" Icon="Accept" runat="server" Text="Confirm">
<AjaxEvents>
<Click OnEvent="TestEvent"><EventMask ShowMask="true"/>
<UserParams><ext:Parameter Name="ButtonValue" Value="getValue(this)" Mode="Raw" /></UserParams>
</Click>
</AjaxEvents>
</ext:Button>
<ext:Label ID="Label1" runat="server" Text=""></ext:Label>
</form>
</body>
</html>
Best regardsMikael Jürke