shadowbox not working - loads in new page - bang head!

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

shadowbox not working - loads in new page - bang head!

stardaug
I've been attempting really hard to get this working with no luck. Maybe some fresh eyes will help.

Here's where the page is located http://www.orangequarter.com/realestate-site/html/resources.html

I want to open images in shadowbox for viewing. I have a pic on there now for testing this. I also have a google link to open google.com in a shadowbox. I think anyhow. In both cases a new page is opened. No shadowbox.

I've tried lightbox, thickbox and now shadowbox. thickbox I came close to getting working - it worked on a localhost preview of the site but not once it was uploaded to the server. The lightbox I never got working. But I have to admit the shadowbox animation is very sweet - it looks good when opening up to display something. I'd love to get it working and support it in buying a commercial license but I've wasted to much money before buying before trying and things never worked. So I'd like to be sure this time.

If anyone has any input that could help I'd appreciate it.

Thanks!



Reply | Threaded
Open this post in threaded view
|

Re: shadowbox not working - loads in new page - bang head!

dirty bird
You need either the stand alone adapter or the appropriate JS adapter for whatever library you choose. I would recommend jQuery. I use shadowbox a lot with jquery and your head tag needs to look something like this

<script type="text/javascript" src="JS/jquery.js"></script><script type="text/javascript" src="JS/shadowbox-jquery.js"></script><script type="text/javascript" src="JS/shadowbox-2.0.js"></script><script type="text/javascript" src="JS/skin.js"></script>
id be happy to help more if you send me some files
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox not working - loads in new page - bang head!

build
G'day dirty bird and staraug,
As the page uses a compressed version of SB with the standalone base compiled into the shadowbox-2.0.js, the adapter is not required.

The following should work.

 
<script type="text/javascript" src="../src/shadowbox-2.0.js"></script>  <script type="text/javascript"> Shadowbox.loadSkin('classic', '../src/skin'); window.onload = Shadowbox.init; </script>   

or

 
<script type="text/javascript" src="/realestate-site/src/shadowbox-2.0.js"></script>  <script type="text/javascript"> Shadowbox.loadSkin('classic', '/realestate-site/src/skin'); window.onload = Shadowbox.init; </script> 

It's very easy to stuff up paths after looking at code for too long, I shall not admit how often I've done it ;-)
btw, nice design, I'm getting jealous of some of the great designs we see here.

beers,
build
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox not working - loads in new page - bang head!

stardaug
Hi guys! Thank you so much for taking the time provide some input on this. I will try the suggestions and let you know how it goes.

Cheers!

Stardaug
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox not working - loads in new page - bang head!

stardaug
SUCCESS! Truly awesome guys! It works now. I stared at the code till I was crossed eye. I figured it was something fairly simple that I was missing but couldn't put my finger on it. So thanks again for help!

Cheers!