Topic: problems with site on iOS

My site is not loading correctly on my iPad.  It's okay on my iPhone where it uses the small-screen layout and on my Mac, but pages are not filling the screen properly on iPad and rotating leaves it in a bit of a mess.  I suspect this may have to do with image sizes ... but maybe not.

Also ... when the galleries load on iPad, the first image doesn't load.  Just a black screen.

Any suggestions?

Re: problems with site on iOS

Oops! forgot to include my site address : grantsymon.com

Re: problems with site on iOS

Try fixing the HTML errors on your web page. (There are not too many so it should not take long but the errors that currently exist may be causing problems.) Different browsers may be more tolerant towards errors than others.
This may or may not help but, even if it does not, once the errors are fixed, your web page should be rendered with greater predictability and consistency across different browsers and we can then eliminate HTML errors as being a possible cause of your problem.
You can check the code on your web page using the W3C Markup Validation Service and then fix the errors reported.

Also, rather than load your gallery into an iframe whose dimensions look to be set dynamically by JavaScript, you might like to try embedding your gallery directly into your web page by following the baseUrl embedding instructions here.

You could also check to see if your problem happens just in Mobile Safari or in Chrome, too.

Also ... when the galleries load on iPad, the first image doesn't load.  Just a black screen.

This sounds like you may be viewing your gallery over a 3G/4G connection (rather than wi-fi). If this is the case, then please see this FAQ which has a solution: Why can't I view my gallery on a 3G mobile connection?

Re: problems with site on iOS

Hi Steven,

thanks for the reply.  I'm currently learning a lot about building websites and will probably soon be re-working the Desktop site to remove the iFrame and ancient code.

However ...

I should have been more precise.  There is a re-direct on the Desktop site, so I'm guessing you didn't see the mobile site?

It is not in in an iFrame, it just runs straight, un-embedded, Juicebox.  There's a Home Page, but once you click a link, it's pure Juicebox.

mobile.grantsymon.com

If you open the site in a Desktop browser, you'll see that the gallery is not res-sizing when you re-size the window.  The button-bar buttons are not working either and the initial image isn't loading.  There's clearly something wrong, but I'm not sure what is the best way to fix it.  Is image size an issue?

Re: problems with site on iOS

I see the problem in your mobile.grantsymon.com site and I have been able to replicate the problem in a test gallery of my own using the configuration options that your galleries use.

The problem seems to be with the combination of the following two options:

backButtonUseIcon="TRUE"
backButtonHAlign="CENTER"

I have logged a bug report with the developers and this should hopefully be fixed in the next version of Juicebox-Pro.
In the meantime, workarounds would be to either set backButtonUseIcon="FALSE" (and use backButtonText to set text or a custom image instead) or to set backButtonHAlign to either "LEFT" or "RIGHT".

Re: problems with site on iOS

Hi Steven,

I'd already found it!!  :) :)

I've updated my site, so your developers won't see it any more.

I just had to change the Back Button HAlign to 'Left'

http://www.grantsymon.com/Grabs/JuiceBoxHomeBug.png

(One extra question concerning the Back Button ... if I load a page/gallery directly, without going to the Home page first, then the BackButton doesn't do anything.  I have it set to blank/empty/nothing in it.  Is there any way to have it always go back one level?  (I have my site in two languages on two sub-domains, so I don't want to go to the start page, which is a language selection page).

Re: problems with site on iOS

I've updated my site, so your developers won't see it any more.

That's not a problem. I have created my own test gallery for the bug report.

I have it set to blank/empty/nothing in it.

Leaving the backButtonUrl empty will go back one page in the browser's history when the Back Button is clicked.
You can set the backButtonUrl to a specific page using either an absolute path, e.g.:

backButtonUrl="http://www.example.com/gallery/index.html"

... or a relative path (relative to the web page containing the gallery's embedding code), e.g.:

backButtonUrl="index.html"

Is there any way to have it always go back one level?

If you want the Back Button to go back a level, you can use:

backButtonUrl="../"

... and the browser will load the default web page in the gallery's parent directory.

Re: problems with site on iOS

Thanks Steven.

What I would like to do may not be possible, but perhaps you could help me further.

As mentioned I have 2 sub-domains for my mobile site (French and English). Both serve the same JuiceBox galleries via an iFrame (so I don't have to produce them twice).  Both sub-domains have a language choice page as the index page, which seems logical to me (though obviously not essential)

I'd like the back button to go back to the first level of the domain that's being used to view the galleries ... however ... my galleries are not embedded, they're in an iFrame.

Absolute paths obviously don't work.  The default 'back one level' does work, but only if people visit the index, or menu pages first (so not if someone sends them a direct link to a specific gallery).

Is there a way to have the back button go to a relative URL, which would be, for example : /e/   
and which would work for both sub-domains (mobilef.grantsymon.com + mobile.grantsymon.com)?

I have been thinking about building a new responsive site to cater to desktop/mobile, in order to simplify things and using embedding instead of iFrames, so if this would resolve the issue ... even though I've not managed to get embedding working from remote directories ... then I'd be happy to go this route).

Re: problems with site on iOS

Is there a way to have the back button go to a relative URL, which would be, for example : /e/   
and which would work for both sub-domains (mobilef.grantsymon.com + mobile.grantsymon.com)?

You could certainly set the backButtonUrl to use a path starting with a leading slash (to denote your root directory).
This should work on whatever domain (or subdomain) the gallery is on.
However, this will work only within the iframe.

You could perhaps attach a custom click handler to the Back Button icon class and load the URL (starting with the leading slash to work on both your subdomains) as the 'top' window (replacing the iframe and its parent page) using JavaScript.
You could try using embedding code such as the following:

<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
    // Give your 'juicebox' object a variable name (in this example 'jb') so that you can refer to it later
    var jb = new juicebox({
        containerId: 'juicebox-container',
        backButtonPosition: 'TOP',
        backButtonUseIcon: 'TRUE'
    });
    // Attach the click handler to the Back Button icon class when the gallery is ready
    jb.onInitComplete = function() {
        $('.jb-go-back').click(function() {
            // Load the URL as the 'top' window (replacing the iframe and its parent page)
            window.top.location.href = '/e/';
        });
    };
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

Hopefully you will be able to implement this within your project.

10

Re: problems with site on iOS

Thanks Steven.