Method 1: http://www.cnblogs.com/tianxiangbing/archive/2010/09/13/jquery_dialog.html
The usage method is as follows:
$ ("# Dialog-confirm"). Openwidow ({ID:"ABC", Width:440, Height:500, Title:"Zookeeper", URL:"Test_url.asp"});
Method 2: http://zhengcaihai529.javaeye.com/blog/728630
The second method is simpler and easier to use.
Jquery. UI. Dialog. js needs to be improved:
1. Add parameters to Dialog
A value is usually included in the interface. This value must be input in the opened dialog. Therefore, modify the options of dialog to add postparams, and read the parameters in the URL when the dialog is created (note that only a few parameters can be used, there are restrictions on passing parameters in different browser URLs ). Modify as follows:
_ Create: Function (){
This . Originaltitle = This . Element. ATTR ( ' Title ' );
// #5742-. ATTR () might return a domelement
If ( Typeof This . Originaltitle ! = " String " ){
This . Originaltitle = "" ;
}
This . Options. Title = This . Options. Title | This . Originaltitle;
// Update by zhengcaihai if IFRAME
If ( This . Element && ( This . Element [ 0 ]. Tagname. tolowercase () = ' IFRAME ' ) && This . Options. postparams ){
VaR SRC = This . Element. ATTR ( " SRC " ), Q = '' ;
VaR Arr = This . Options. postparams. Split ( " , " );
If (ARR ! = Null && Arr ! = '' ){
For ( VaR N In ARR ){
Q + = $. Param ($ ( " # " + Arr [N]). formtoarray ( True )) + " & " ;
}
This . Element. ATTR ( " SRC " , SRC + ' ? ' + Q );
}
}
VaR Self = This ,
Options = Self. Options,
The usage of the token is as follows:
$ ( ' <IFRAME frameborder = "0"/> ' ). Dialog ({
Autoopen: True ,
Title: " Use Login " ,
Height: 200 ,
Position: ' Center ' ,
Width: 440 ,
Show: " Explode " ,
Hide: " Highlight " ,
Beforeclose: Function (){
// Todo
}
}). Width ( 440 ). Height ( 200 ). ATTR ( " SRC " , " Test_url.asp " );