Use greybox to describe ASP. NET Recently, it is easy to see this effect, that is, when you select a video or link in the webpage, the background will immediately become dark and the loading... Then jump out of a beautiful box to show the picture or webpage. This effect is called lightbox. In addition to images and webpages, The greybox can be used to display images, Flash files, and videos in the box displayed by lightbox. I. Security Department Program (http://orangoo.com/labs/GreyBox/Download) Deploy the solution to the root website Ii. Usage 'Before its announcement
System. Web. httpcontext. Current. response. Write ("<SCRIPT type =" "text/JavaScript" "> ") System. Web. httpcontext. Current. response. Write ("Var gb_root_dir =" "greybox /"";") System. Web. httpcontext. Current. response. Write ("</SCRIPT> ") System. web. httpcontext. current. response. write ("<SCRIPT type =" "text/JavaScript" "src =" "greybox/AJS. JS ""> </SCRIPT> ") System. Web. httpcontext. Current. response. Write ("<SCRIPT type =" "text/JavaScript" "src =" "greybox/ajs_fx.js" "> </SCRIPT> ") System. Web. httpcontext. Current. response. Write ("<SCRIPT type =" "text/JavaScript" "src =" "greybox/gb_scripts.js" "> </SCRIPT> ") System. web. httpcontext. current. response. write ("<link href =" "greybox/gb_styles.css" "rel =" "stylesheet" "type =" "text/CSS" "/> ") |
'Call founction (a href method)
'Example 1: show the 200*100 webpage, with the goal of "warning messages" and sending messages to message. aspx System. web. httpcontext. current. response. write ("<a href =" "message. aspx "" Title = "" Warning interest "" rel = "" gb_page_center [200,100] "> show 200*100 webpages </a> ") |
'Example 2: start a full-version Google website System. web. httpcontext. current. response. write ("<a href =" "http://google.com/" Title = "" google "" rel = "" gb_page_fs [] ""> launch Google.com in fullscreen window </a>") |
'Example 3: start the first video. System. web. httpcontext. current. response. write ("<a href =" "http://orangoo.com/labs/greybox/static_files/night_valley.jpg" "rel =" "gb_imageset [nice_pics]" "Title =" "page1"> </a> ") 'Activate the second release System. web. httpcontext. current. response. write ("<a href =" "http://orangoo.com/labs/greybox/static_files/night_valley.jpg" "rel =" "gb_imageset [nice_pics]" "Title =" "page2"> </a> ") |
'Call the function (directly show off)
System. web. httpcontext. current. response. write ("<SCRIPT> AJS. AEV (window, 'load', function () {gb_showcenter ("" Hello World "","".. /message. aspx "", 200,200) ;}); </SCRIPT> ") |
Iii. Questions and answers Original article address Q: which regions do I need to renew to make greybox work?
You only need to solve the greybox deployment errors in the restored greybox deployment errors. |
Q: Why can't images be displayed only when they are stored in greybox images?
Your gb_root_dir has not been set to correct. |
Q: How can I configure my own relationship between nodes and click between nodes?
<A href = "#" onclick = "parent. Parent. gb_hide ();"> my close button </a> |
Q: How can I use greybox to insert a plane?
Greybox uses the signature plane injection command of AJS connector. AJS. AEV (window, 'load', function () {gb_show ("Hello World", "http://google.com ");}); |
Q: How can I make greybox appear in the upper plane?
Gb_show of standard definition is as follows: Gb_show = function (Caption, URL,/* optional */height, width, callback_fn ){ VaR Options = { Caption: caption, Height: height | 500, Width: width || 500, Fullscreen: false, Callback_fn: callback_fn } VaR win = new gb_window (options ); Return win. Show (URL ); } Because in the greybox/base. js environment, we use the following statistics: Init: function (options ){ This. type = "page "; This. overlay_click_close = false; This. Salt = 0; This. root_dir = gb_root_dir; This. callback_fns = []; This. reload_on_close = false; This. src_loader = This. root_dir + 'loader_frame.html '; This. show_loading = true; AJS. Update (this, options ); }, We can see that the show_loading parameter value is true, so we can create a new function (named gb_myshow at runtime) 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 ); } Note that the show_loading in the preceding statement is false, and then reference this function.
<A href = "http://google.com/" onclick = "Return gb_myshow ('Google ', this. href)"> visit Google </a> |
Similarly, we can also modify overlay_click_close to realize the effect of the close relationship. Q: How to Use WordPress? WordPress can be created in a second category. Therefore, use the correct method.
<SCRIPT type = "text/JavaScript" src = "http://www.my-wordpress-site.com/greybox/AJS.js"> </SCRIPT> <SCRIPT type = "text/JavaScript" src = "http://www.my-wordpress-site.com/greybox/AJS_fx.js"> </SCRIPT> <script type = "text/JavaScript" src = "http://www.my-wordpress-site.com/greybox/gb_scripts.js"> </SCRIPT> <link href = "http://www.my-wordpress-site.com/greybox/gb_styles.css" rel = "stylesheet" type = "text/CSS"> |
|
Q: How to use Google Maps?
Search for help using Google APIs or discussion forums. |
Q: Why can't I use it in a Dreamweaver webpage?
Upload the mm_imagepreloader from the response, and then modify it.
<Body onload = "..."> to just <body> |
|
|