1

I use Highslide on my website and blog and the images pop up beautifully when the URL starts http://, but when the URL URL starts https:// (which it doesn't automatically do as I haven't enabled it yet) then images don't pop up, they open up on a blank page. Is this because of JS? I do refer to all images using https:// in the code. Thanks, Ilke C

Making sure all src in the img tag are https://

In the head:

<script type="text/javascript" src="highslidemf/highslide-full.js"></script>
<script type="text/javascript" src="highslidemf/highslide.config.js"></script>
<link rel="stylesheet" type="text/css" href="highslidemf/highslide.css" />

In the body: main website

<a href="images/gallery/TrinasSheepBangle.jpg" class="highslide" rel="highslide"><img src="images/gallery/TrinasSheepBangle.jpg" width="150" height="150" alt="Trina's Sheep mounted in a bangle" /></a>

WordPress blog

<a class="highslide" rel="highslide" href="https://www.mabelfigworthy.co.uk/fof/images/BarExperiments1.jpg"><img src="https://www.mabelfigworthy.co.uk/fof/images/BarExperiments1.jpg" width="137" height="150" alt="Preparing a cutwork grid" /></a>

Expected result: when clicking on an image, a larger version pops up. Actual result: when clicking an image, it opens the larger version on a page of its own, so you need to use the back button to get back to the blog/website.

  • If it's opening the image on it's own, that's a sure sign that the Highslide script isn't being loaded on the page. Open the browser's developer's console, and take a look at the Console and Network tabs - you'll probably find a big hint there. – MisterNeutron Nov 17 '19 at 22:03
  • Thanks, I'll try that. Could that be caused by the https:// instead of http:// ? – Ilke Cochrane Nov 19 '19 at 08:57
  • I think if the page is being called securely, your attempt to load the script is probably being done insecurely, which leads to mixed content, which the browser will block. If you just set your site to default to https and redirect all incoming requests from http to https, you'll be fine. But I'd have to see your page live to be sure. – MisterNeutron Nov 19 '19 at 12:16
  • Thanks, I eventually found a solution, or at least a workaround - call the script in the head without a protocol, so //www.example.com rather than preceded by either http:// or https:// In time I will make the whole thing https:// but at the moment that is not yet practicable, and for now this at least makes it work! – Ilke Cochrane Nov 20 '19 at 13:42

0 Answers0