Use greybox to implement the Ajax mode window

Source: Internet
Author: User
On the web page ( <Header>... ) To add the JS script path.

<SCRIPT type = "text/JavaScript">
VaR gb_root_dir = "./greybox/"; my scripts are stored in the greybox directory of the root directory of the website.
</SCRIPT>

Download the script package (modified the path of the close button image in gb_scripts.js)

Easy to use

<A href = "http://www.cnblogs.com/5tao" Title = "caterpillar" rel = "gb_page_center [640,480]"> my blog in a 640x480 window </a>

<A href = "http://google.com/" Title = "google" rel = "gb_pageset [search_sites]"> launch Google search </a>

Only the title and rel parameters are added to the common <A>.

Title: The title of the mode window.

Rel: the style of the mode window. Including

Rel = "gb_page_center [1, 640,480]"
Rel = "gb_page_fs []"
Rel = "gb_pageset [search_sites]"

Use function call
<SCRIPT type = "text/JavaScript">
Gb_myshow = function (Caption, URL,/* optional */height, width, callback_fn ){
VaR Options = {
Caption: caption,
Height: height | 500,
Width: width || 500,
Fullscreen: false,
Show_loading: false,
Callback_fn: callback_fn
}
VaR win = new gb_window (options );
Return win. Show (URL );
}
</SCRIPT>

<A href = "http://google.com/" onclick = "Return gb_myshow ('Google ', this. href)"> visit Google without loading </a>

Please advise
For more information, see orangoo.com.

Related Article

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.