Rahul Kumar
Rahul Kumar

Reputation: 524

How to close the jquery dialog

This is my code i open the page url into the dialog. now i want to close the dialog from the page default4.aspx that is actually inside the dialog..

In Default4.aspx there is button name close: now i want to close the dialog and also want pass some value to close function :

 close: function(event,ui){
here:
  }

the code i used:

 $("#pop").load('Default4.aspx').dialog({
             height: 625,
             width: 600,
             modal:true,
             close: function(event,ui){


             //alert(event)
             //Check for Ok or cancle
             // if ok then do something

            // alert(ui);

             }
             }); 

Any Idea Guys How Can i do this..

Upvotes: 1

Views: 196

Answers (1)

Vlad Dneprovskiy
Vlad Dneprovskiy

Reputation: 179

Just call $("#pop").dialog("close"); in Default4.aspx

For passing parametrs you can use input hidden element

$("#hidden").val("my param value");   
<...> 
var param = $("#hidden").val();

Upvotes: 1

Related Questions