Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
my code is..
JavaScript
$(document).ready(function () {
          
             $("#dialog").dialog({
                autoOpen: false,
                appendTo: "form",
                           
                show: {
                    effect: "fade",
                    duration: 1000
                },
                                 hide: {
                    effect: "explode",
                    duration: 1000
                },

                buttons: {
                    Ok: function () {
                        $("[id*=btnmsgOk]").click();
                        $(this).dialog("close");
                    },
                    Cancel: function () {
                        $(this).dialog("close");
                    }
                }
            });
     
     });

then i call it by
JavaScript
$('<%=btnSave.ClientID %>').click(function () {
                $("#dialog").dialog("open");
             });

but it doesnot work.When in set autoopen true then ok button generates popstback but i want it working on button click.
any help is appriciated thankyou.
Posted

1 solution

Important thing you should know while using Jquery is PostBack property
When postback occurse JQuery code will get its original values..
So you should prevent postback to see the functionality of it..

e.preventDefaults();

i used animations which delays forms to be visible so i wasnt able to see dialog but i fixed it myself. thanks for everybody who responded to it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900