# Anyone familiar with Shadowbox (javascript)

**URL:** https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392
**Category:** Factual Questions
**Created:** [December 23, 2008, 12:49am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392 "2008-12-23T00:49:07Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Stan\_Shmenge](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Stan\_Shmenge](https://boards.straightdope.com/u/Stan_Shmenge)
#### Post date: [December 23, 2008, 12:49am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/1 "2008-12-23T00:49:07Z")

</div>

We are trying to use the Shadowbox plugin with no success. If only the guy would give a simple example, but he basically just says “look at my homepage” which is a massive mess of CSS and HTML mixed in.

Anyone know of a page that provides a simple example?

[link](http://www.mjijackson.com/shadowbox/index.html)

---

<div class="post-metadata">

### Author: ![GuanoLad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/guanolad/32/42_2.png) [@GuanoLad](https://boards.straightdope.com/u/GuanoLad)
#### Post date: [December 23, 2008, 12:56am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/2 "2008-12-23T00:56:43Z")

</div>

Are you familiar with javascript? It’s not really a plugin, as such.

Download the files and put them where they need to be, relative to your page.

In the head of his HTML there are three links to javascript with the word shadowbox in them. Two point offpage, the third has the code embedded. Copy and paste those where you want the media to be.

Then choose one of the different styles he showcases on the page, find it in the HTML, and copy and paste it into your page, changing the details to match where your media file is kept.

---

<div class="post-metadata">

### Author: ![Stan\_Shmenge](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Stan\_Shmenge](https://boards.straightdope.com/u/Stan_Shmenge)
#### Post date: [December 23, 2008, 1:19am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/3 "2008-12-23T01:19:32Z")

</div>

I am developing under windows, but the paths in the examples he give look like 'nix paths. Could that be the problem?

---

<div class="post-metadata">

### Author: ![Stan\_Shmenge](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Stan\_Shmenge](https://boards.straightdope.com/u/Stan_Shmenge)
#### Post date: [December 23, 2008, 1:25am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/4 "2008-12-23T01:25:27Z")

</div>

here is what I have so far. All the .js files are being kept in the sandbox directory:  
\<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2//EN”\>  
\<HTML\>\<HEAD\>  
\<TITLE\>TESTING SHADOWBOX\</TITLE\>  
\<head\>  
\<script type=“text/javascript” src=“shadowbox-base.js”\>\</script\>  
\<script type=“text/javascript” src=“shadowbox.js”\>\</script\>  
\<script type=“text/javascript”\>  
Shadowbox.loadSkin(‘classic’, ‘c:\ShadowboxSandbox’); // use the “classic” skin  
Shadowbox.loadLanguage(‘en’, ‘c:\ShadowboxSandbox’); // use the English language  
Shadowbox.loadPlayer([‘img’, ‘qt’], 'c:\ShadowboxSandbox); // use img and qt players

window.onload = Shadowbox.init;

\</script\>

\</HEAD\>

\<BODY\>  
\<a href=“test.jpg” rel=“shadowbox”\>My Image\</a\>

HELLO WORLD.

\</BODY\>  
\</HTML\>

---

<div class="post-metadata">

### Author: ![Stan\_Shmenge](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Stan\_Shmenge](https://boards.straightdope.com/u/Stan_Shmenge)
#### Post date: [December 23, 2008, 1:31am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/5 "2008-12-23T01:31:03Z")

</div>

As you can see, I am using absolute paths with widows type pathnames.

---

<div class="post-metadata">

### Author: ![ZipperJJ](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zipperjj/32/211_2.png) [@ZipperJJ](https://boards.straightdope.com/u/ZipperJJ)
#### Post date: [December 23, 2008, 2:42am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/6 "2008-12-23T02:42:22Z")

</div>

Did you check out the “Download Full” link on the download page that has full documentation and a sample gallery?

Also, are you getting any errors? If so, which errors? Your code looks fine if everything, including the HTML page, are in the same directory. What is the problem you are having?

IE is crap for showing JS errors. If you’re not using Firefox already, use that and then go to Tools - Error Console to show you specific errors.

---

<div class="post-metadata">

### Author: ![Stan\_Shmenge](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Stan\_Shmenge](https://boards.straightdope.com/u/Stan_Shmenge)
#### Post date: [December 23, 2008, 3:17am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/7 "2008-12-23T03:17:04Z")

</div>

> [@ZipperJJ](#):
>
> Did you check out the “Download Full” link on the download page that has full documentation and a sample gallery?
> 
> Also, are you getting any errors? If so, which errors? Your code looks fine if everything, including the HTML page, are in the same directory. What is the problem you are having?
> 
> IE is crap for showing JS errors. If you’re not using Firefox already, use that and then go to Tools - Error Console to show you specific errors.

It just displays the jpg without the shadowbox effect, as though the HREF tag didn’t even contain the rel=“shadowbox” parameter.

---

<div class="post-metadata">

### Author: ![arseNal](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@arseNal](https://boards.straightdope.com/u/arseNal)
#### Post date: [December 23, 2008, 6:06am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/8 "2008-12-23T06:06:09Z")

</div>

I don’t think those are unix paths, they should be relative URLs on his server. Being that javascript is run in the user’s browser, it makes no sense for it to be trying to access files on any hard drive directly. It generally has to load everything via http. So “src/skin” is actually a path at his site, i.e., [Deneme Bonusu Veren Bahis Siteleri - En iyi Bonus Veren Siteler Nelerdir?](http://www.mjijackson.com/shadowbox/src/skin/)

If you click that link you do get a 403 however, because he has directory listing turned off. But I do believe the 403 indicates that the directory exists, because if you put in some bogus URL like

> **[WebMD - Better information. Better health.](http://mjijackson.com/)**
>
> The leading source for trustworthy and timely health and medical news and information. Providing credible health information, supportive community, and educational services by blending award-winning expertise in content, community services, expert...

you get a ‘nothing here’ page.

---

<div class="post-metadata">

### Author: ![Stan\_Shmenge](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Stan\_Shmenge](https://boards.straightdope.com/u/Stan_Shmenge)
#### Post date: [December 23, 2008, 10:59am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/9 "2008-12-23T10:59:55Z")

</div>

Thanks to all. My partner got it going.

---

<div class="post-metadata">

### Author: ![Duckster](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/duckster/32/1244_2.png) [@Duckster](https://boards.straightdope.com/u/Duckster)
#### Post date: [December 24, 2008, 3:20am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/10 "2008-12-24T03:20:06Z")

</div>

It’s a poor variation of the [original LightBox](http://www.lokeshdhakar.com/projects/lightbox2/).

Or try it with a [jquery](http://jquery.com/) addon.

---

<div class="post-metadata">

### Author: ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)
#### Post date: [December 24, 2008, 8:42am UTC](https://boards.straightdope.com/t/anyone-familiar-with-shadowbox-javascript/478392/11 "2008-12-24T08:42:04Z")

</div>

I don’t know if I’d call it a _poor_ variation. It’s very nice that he designed it with an abstraction layer that lets you use whatever framework you already use, rather than forcing you to load a specific one just for this one piece of functionality. That’s what made me pick it when I was shopping for one of these.
