Topic: [SOLVED] Problem with Base URL

Hi there,
I'm trying to use the baseURL method to embed a JuiceBox gallery in my html page within a Moodle course.

I've uploaded my Juicebox Gallery to here:
www.habitsofmind.org/sites/default/files/JB_Galleries/Displays/

All the JB folders are inside the "Displays" folder.

I've modified the script to:

<!--START JUICEBOX EMBED-->
<script src="http://www.habitsofmind.org/sites/default/files/JB_Galleries/Displays/jbcore/juicebox.js" type="text/javascript"></script>
<script type="text/javascript">// <![CDATA[
new juicebox({
baseURL : 'http://www.habitsofmind.org/sites/defau … /Displays/'
containerId : "juicebox-container",
galleryWidth: "100%",
galleryHeight: "100%",
backgroundColor: "#222222"
});
// ]]></script>
<div id="juicebox-container">Here's the Juice Box Slide Show</div>
<!--END JUICEBOX EMBED-->

But nothing shows. Can't seem to workout what I've done wrong. Any clues?

Thanks

James

Re: [SOLVED] Problem with Base URL

Actually, looking at the script above, that's not what I put in. What I put in was
<!--START JUICEBOX EMBED-->
<script src="http://www.habitsofmind.org/sites/default/files/JB_Galleries/Displays/jbcore/juicebox.js"></script>
<script>
  new juicebox({
    baseUrl : 'http://www.habitsofmind.org/sites/defau … /Displays/',
    containerId : 'juicebox-container',
    galleryWidth : '800',
    galleryHeight : '600',
    backgroundColor: '#222222'
  });
  </script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

but then it got changed somehow to the above with the error messages.

So... any ideas? I'm not a html person, but can usually do simple stuff like this.

Re: [SOLVED] Problem with Base URL

Your editor is automatically inserting CDATA tags within your <script> tags but this is unlikely to be the cause of your problem.
(If you have the option of being able to enter raw HTML code and not have it altered by the editor, choose that.)

In the code you posted in your first post, there should be a comma after the baseUrl line.

All your files look to be in the correct locations and the permissions seem to be OK so the problem is likely to be with your embedding code. If the suggestions above do not help, please post the URL to the web page into which you are trying to embed your gallery so that I can take a look and help further.

But nothing shows.

This FAQ may also help:
When I view my gallery, I see a blank area. Why?

Re: [SOLVED] Problem with Base URL

Thanks for your help.

I don't think I have a choice of entering raw HTML.

I carefully checked the code and this is what I've pasted - before my editor adds stuff to it.

<!--START JUICEBOX EMBED-->
<script src="http://www.habitsofmind.org/files/JB_Galleries/Displays/jbcore/juicebox.js"></script>
<script>
  new juicebox({
    baseUrl : 'http://www.habitsofmind.org/files/JB_Ga … /Displays/',
    containerId : 'juicebox-container',
    galleryWidth : '800',
    galleryHeight : '600',
    backgroundColor: '#222222'
  });
  </script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

The URL I'm using is within a Moodle installation (behind a password etc). But I've also tried the same code on a test web page and couldn't get it to work. Have a look here

http://www.habitsofmind.org/node/1020

Thanks

James

Re: [SOLVED] Problem with Base URL

Yep, on an even more careful look it was a path error. My fault. Oooops.
All working now.

Re: [SOLVED] Problem with Base URL

I'm glad you have been able to resolve your problem.
Thank you for posting back to let me know.