Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/07/2014, 23:21
Davico2189
 
Fecha de Ingreso: julio-2014
Mensajes: 3
Antigüedad: 9 años, 9 meses
Puntos: 0
Crear 2 Dialog en aspx.net

Buenas noches, quisiera saber si es posible mostrar un dialog cuando abro una pagina indicando si desea realizar una operacion.

Es decir como en mi caso :

Cuando ingreso a la pagina "Producto"
Muestro un Dialog diciendole si desea abonar un monto a su cuenta con dos botones, aceptar y cancelar. si es Aceptar se deberia abrir otro dialog donde ingresara los datos requeridos.

Hasta el momento he podido hacer esto, pero cuando le doy en el boton aceptar sigue abriendose el mismo dialog sin llamar al otro dialog.

Código:
//Primer dialog a mostrar
$(function mostrarmensaje() {

    var dialogDefine = $("#mensaje").dialog({
        autoOpen: true,
        modal: true,
        resizable: false,
        height: 160,
        show: {
            effect: "blind",
            duration: 100
        },
        hide: {
            effect: 'explode',
            duration: 1000
        },
        buttons: {
            Ok: function () {
                $("[id=btnCuenta]").click();
            },
            }
    }).parent().appendTo("form");
       
});
//Segundo dialog a mostrar
$(function DespositoCuenta() {

    var dialogDefine = $("#cuenta").dialog({
        autoOpen: false,
        modal: true,
        resizable: false,
        height: 160,
        show: {
            effect: "blind",
            duration: 100
        },
        hide: {
            effect: 'explode',
            duration: 1000
        },
        buttons: {
            Ok: function () {
                $("[id=btnDeposito]").click();
            },
            Close: function () {
                $(this).dialog('close');
            }
        }
    }).parent().appendTo("form");
    $("#btnCuenta").click(function () {
        $("#cuenta").dialog("open");
        return;
    })
});
En el html

Código:
<script type="text/javascript">
        mostrarmensaje();
    </script>

 <div id="mensaje" style="display:none">
            <div class="login">
            <h1>MENSAJE</h1>
           
                <p>
                    <asp:Label ID="Label1" runat="server">DESEA DESPOSITAR MONTO A SU CUENTA</asp:Label>
                    
                </p>
                <p class="submit">
                    <asp:Button ID="btnCuenta" runat="server" Text="Aceptar" OnClick="btnCuenta_Click"/>
                    
                </p>
            
        </div>
    </div>         
     <div id="cuenta" title="CUENTA" style="display:none">
            <div class="login">
            <h1>DEPOSITO</h1>
           
                <p>
                    <asp:Label ID="lblMonto" runat="server">MONTO</asp:Label>
                    <asp:TextBox ID="txtMonto" runat="server" ></asp:TextBox>

                </p>
                <p class="submit">
                    <asp:Button ID="btnDeposito" runat="server" Text="DEPOSITAR" OnClick="btnDepositar_Click" />
                </p>
            
        </div>
    </div>