Jquery dialog URL

Source: Internet
Author: User

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 " );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.