It is currently Mon Sep 22, 2014 8:14 pm Advanced search

Catching slideshow exit event

Technical support, bug reports, feature requests and more.

Catching slideshow exit event

Postby ambipur » Fri Feb 24, 2012 1:52 am

Hi everybody,

is it somehow possible to catch the event when the user exits from a running slideshow, or when a user clicks on a thumbnail but slideshow is not started, but the user escapes from the bigger size image? Thank you in advance!
ambipur
 
Posts: 25
Joined: Fri Dec 31, 2010 3:31 pm

Re: Catching slideshow exit event

Postby RoadRash » Fri Feb 24, 2012 12:12 pm

Hi,

You can see the full list of supported events at the bottom of the API reference page: http://highslide.com/ref/
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
User avatar
RoadRash
 
Posts: 8215
Joined: Tue Jul 15, 2008 8:43 pm
Location: Fredrikstad, Norway

Re: Catching slideshow exit event

Postby ambipur » Wed Feb 29, 2012 12:56 pm

Hi Roadrash,

in the documentation you have linked I have found the function onAfterExpand. It seems that it fires each time during slideshow when an image is closed and the next is opened automatically during the slideshow. I would need the event when the user presses Esc or the X (Close) button during the slideshow. Can you help me? Thanks in advance!
ambipur
 
Posts: 25
Joined: Fri Dec 31, 2010 3:31 pm

Re: Catching slideshow exit event

Postby RoadRash » Thu Mar 01, 2012 1:03 pm

See onBeforeClose
Live demo: http://jsfiddle.net/rF9j3/
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
User avatar
RoadRash
 
Posts: 8215
Joined: Tue Jul 15, 2008 8:43 pm
Location: Fredrikstad, Norway

Re: Catching slideshow exit event

Postby ambipur » Tue Mar 06, 2012 1:05 pm

Hi Roadrash,

the onBeforeClose event works as expected: it triggers when I close the slideshow or the opend image. For some reasons I would like to reload the page using window.location.href method. This case the page crashes, perhaps because some javascript functions are running at this moment. Is it possible to close them somehow before invoking the page reload? Actually for me it would be much better to rewrite the URL, actually only one passed parameter, without page reload, but I think that it is not possible. Thanks in advance!
ambipur
 
Posts: 25
Joined: Fri Dec 31, 2010 3:31 pm

Re: Catching slideshow exit event

Postby RoadRash » Wed Mar 07, 2012 11:50 am

I canÔÇÖt see any problem using the onBeforeClose event in these two demos, but your page might contain something that cause conflicts:
http://jsfiddle.net/rF9j3/1/ (Outside the jsFiddle frames: http://fiddle.jshell.net/rF9j3/1/show/light/)
Using:
Code: Select all
hs.Expander.prototype.onBeforeClose = function () {
    window.location.reload();
};


http://jsfiddle.net/rF9j3/2/ (Outside the jsFiddle frames: http://fiddle.jshell.net/rF9j3/2/show/light/)
Using:
Code: Select all
hs.Expander.prototype.onBeforeClose = function () {
    window.location.href = 'http://highslide.com/';
};
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
User avatar
RoadRash
 
Posts: 8215
Joined: Tue Jul 15, 2008 8:43 pm
Location: Fredrikstad, Norway

Re: Catching slideshow exit event

Postby ambipur » Fri Mar 09, 2012 6:20 pm

Hi RoadRash,

I have tried to disable my menu component to make my code as similar as possible to yours. I have used Firefox error console. I have the following error after invoking page reload:

hs is not fefined

After it comes the link of my page. When I click on this row, the source code opens:

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
    <HEAD>
   <TITLE>Ol├íh Ajtony Ambrus f├®nyk├®palbuma</TITLE>
   <META http-equiv="Content-Type" content="text/html; charset=utf-8">

   <! Menu component >
   <!   script type="text/javascript" src="SpryAssets/SpryMenuBar.js"></script>
   <!   link rel="stylesheet" type="text/css" href="SpryAssets/SpryMenuBarVertical.css">

   <! HighSlide JS >
   <script type="text/javascript" language="javascript" src="res/highslide-full.js"></script>
   <link rel="stylesheet" type="text/css" href="res/styles_new.css">
   <!   script type="text/javascript" src="res/easing_equations.js"></script>

   <! Apply patch for old IE browser to display correctly transparent PNG pictures >
   <style type="text/css">
   img, div, a, input
   {
       behavior: url(res/iepngfix.htc);
   }
   -->
   </style>

   <script type="text/javascript">
       var file_ext_thumbs = {".mov":"movie.png"}
       var page = 6
   
       // Set options selected in the Boxer Highslide JS tab
       hs.graphicsDir = 'res/graphics/';


The last line is highlighted indicating that something is wrong. For me it is totally strange, because opening the page normally within browser there is no problem. Do you have any idea? Thanks in advance!
ambipur
 
Posts: 25
Joined: Fri Dec 31, 2010 3:31 pm

Re: Catching slideshow exit event

Postby RoadRash » Sun Mar 11, 2012 9:15 am

Can I please see your live page?
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
User avatar
RoadRash
 
Posts: 8215
Joined: Tue Jul 15, 2008 8:43 pm
Location: Fredrikstad, Norway

Re: Catching slideshow exit event

Postby ambipur » Tue Mar 13, 2012 12:36 am

Hi RoadRash,

let's start at http://deruyter.dyndns.org/test/index_new.php?year=2011&page=5

Click for example on one of the pictures in the last row of the current subpage and please start a slideshow. Please wait until one of the pictures in the first row of the next subpage is reached. The pager at the feft bottom part should indicate that the next subpage is reached. If you now interrupt the slideshow, a page reload should occur to currently display the URL withe page=6. Unfortunately this page reload freezes. Thanks in advance!
ambipur
 
Posts: 25
Joined: Fri Dec 31, 2010 3:31 pm

Re: Catching slideshow exit event

Postby RoadRash » Tue Mar 13, 2012 4:14 pm

It seems to be an error in your function GetURLParameter()
When I goes from
Code: Select all
http://deruyter.dyndns.org/test/index_new.php?year=2011&page=5
I would think that the next page should be
Code: Select all
http://deruyter.dyndns.org/test/index_new.php?year=2011&page=6
after a reload, but it is actually
Code: Select all
http://deruyter.dyndns.org/test/index_new.php[hilight]/[/hilight]?year=2011&page=6
Note the slash between .php and ?year
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
User avatar
RoadRash
 
Posts: 8215
Joined: Tue Jul 15, 2008 8:43 pm
Location: Fredrikstad, Norway

Re: Catching slideshow exit event

Postby ambipur » Tue Mar 13, 2012 11:56 pm

Hi RoadRash,

yes, you are right! It was a fatal mistake! Thank you very much identifying it!
ambipur
 
Posts: 25
Joined: Fri Dec 31, 2010 3:31 pm


Return to Highslide JS Usage

Who is online

Users browsing this forum: Google [Bot] and 4 guests