Monday, September 24, 2012

how to Passing parameters into a Modal Dialog Window in sharepoin 2010

The share point provide a class for crating modal dialog box i:e SP.UI.ModalDialog.Here i have given an example to create a dialog box for account result by using parameters.The parameter will be assign using args property

function ResultDialog() {
var options = {url: 'Account/Reports.aspx', autoSize: true,title:' 
args: { amt: 'Amt_Tot', category: 'sales' },dialogReturnValueCallback: Result
};
SP.UI.ModalDialog.showModalDialog(options);

}
For the above model dialog box i passed two arguments to display the sales amount regarding order.The reports.aspx has hold the resultant output ,so i dialog box url set to this page here.
Post a Comment

Bel