Topic: iOS baseUrl not working, redirect to full.html in wrong dir [SOLVED]

Steps to reproduce:
1. Use Safari and change your User Agent to iPad, or use an actual iPad device.
2. Visit http://globaltv.uat.smdg.ca/test_44.aspx
3. Click the full screen icon.

Expected behavior:
We expect the user to be redirected to /js/gallery/full.html or /js/gallery/jbcore/full.html because the baseUrl is set to /js/gallery/.

Actual behavior:
The user is redirected to /full.html (the directory of where the gallery is displayed). If we move the test page to the /test/ directory, the user is redirected to /test/full.html instead of respecting the baseUrl value.

Extra notes:
I'm using a PhotoAlbum wrapper class that initializes the juicebox class.
http://globaltv.uat.smdg.ca/js/gallery/ … =test+Vani

Re: iOS baseUrl not working, redirect to full.html in wrong dir [SOLVED]

Juicebox determines the location of the 'jbcore' folder by looking for a <script> tag which loads the 'juicebox.js' file.
However, there is no such <script> tag in your web page (you load the 'juicebox.js' file with $.getScript("/js/gallery/juicebox.js", function () { instead) so Juicebox does not know the location of the 'full.html' file (which is used to expand the gallery in a new page on iOS devices).
If you load the 'juicebox.js' file in the web page containing the gallery's embedding code using a <script> tag as follows, then this would ordinarily solve the problem. However, your gallery's embedding code is contained in an external JavaScript file so I cannot be sure that this solution will work for you (although it is almost certainly the cause of the problem).

<script src="/js/gallery/theme.css"></script>

Re: iOS baseUrl not working, redirect to full.html in wrong dir [SOLVED]

This worked! Thank you so much. I added the following line before initializing the juicebox class.

document.write('<script src="/js/gallery/juicebox.js"></script>');

Re: iOS baseUrl not working, redirect to full.html in wrong dir [SOLVED]

That's great! Thank you for letting me know.