Shadowbox assetURL: Set the path of images

Saturday, April 12, 2008

When Shadowbox opened his window to display content (image, iframe, Movie, etc. ...), displays, pending an animated gif that comes in the package. If the page you're using Shadowbox is at the same level folder of images, everything works fine. By default, in fact, Shadowbox search under the animated gif images / loading.gif - or images / loading-light.gif if you choose the styles light (shadowbox-light.css). Otherwise, and often there is also the risk of not accorgesene, if we are in a different tree, will generate a good code 404 - page Girder not, in our case file not found!

To solve the problem simply initialize Shadowbox with a parameter that should indicate just the absolute path of the folder images: on undolog.com, for example, I placed the animated gif of loading images directly into the folder in root (how about a billion other sites:). To make this folder to Shadowbox, regardless of the route, I simply added:

JavaScript:
  1. / / Init shadowbox with assetURL parameter
  2. assetURL: 'http://www.undolog.com/' } ) ; Shadowbox. Init ((assetURL: 'http://www.undolog.com/'));

Related Post

2 comments to: "Shadowbox assetURL: Set the path of the images"

  1. getAvatar 1.0 Tuesday, April 22, 2008 at 10:16 a.m.
    gianni said:

    I tested the script shadowbox with google maps.
    For every marker I would like to associate an image that is loaded by shadowbox.
    I can not overcome a problem with the passage of varying scprit

      var txt = <a href=../Public/ title="" rel=nofollow rel="nofollow"> 

    with this command I simply open the picture in a new page
    It is visible in http://www.apomezia.it/ungiro/dmappa.asp?id=7
    thanks

    Answer Quote
  2. getAvatar 1.0 Monday, September 15th, 2008 at 10:53 a.m.
    Andrea said:

    Hello, I would like to have clarification on ultilizzo the shadowbox in flash, I used the javascript er some pictures and everything works properly with flash ... but I can not ... I should create a clickable map and every click should start the usual black shade and upload your picture ... But I do not understand how to invoke the image, help rid of mice? to better understand the problem just go on the site http://www.flytosalento.com and go through photo gallery sunrise.

    Answer Quote

Leave a comment

TAG XHTML <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <a <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Use <pre> to enclose code