I have the following problem, I have a button in asp.net which does an action correctly, I have also created a function in javascript to show a confirmation message.
The problem occurs because the button only works when it is pressed a second time.
<script type="text/javascript">
$(function mensaje() {
var btn = $('#<%=btn_distribuir.ClientID %>').attr('name');
abcbpo.ConfigConfirmacion('confirmacion', 'spanConfirmacion', '¿Estás seguro registrar la operación?', btn);});
</script>
<asp:Button ID="btn_distribuir" runat="server" OnClientClick="$('#confirmacion').dialog('open'); return false;" Text="Confirmar Distribución Facturas" Width="250px" />