Topic: Run javascript from Image Link URL

In this forum post (http://juicebox.net/forum/viewtopic.php?id=952) you describe how to run an arbitrary javascript from the Back Button. Can I run a javascript from an Image Link URL also?

I have tried using "javascript myScript();" in the Link URL field for an image in my slideshow but when I click the image, Juicebox is still attempting to launch a URL instead of executing the javascript. It adds my baseURL: value before the script name.

My slideshow is embedded in another webpage via an iframe.

Re: Run javascript from Image Link URL

As you have noticed, this will not work when you use a baseUrl.
The linkURLs were designed to be genuine URLs and Juicebox was not designed to run JavaScript instead.
This takes advantage of the ability to run Javascript from a hyperlink as follows:

<a href="javascript: run_function();">Content</a>

If you use a baseUrl, Juicebox will prepend it to the 'href' attribute in the dynamically generated hyperlink resulting in a broken JavaScript call.
There is nothing that can be done to circumvent this behavior. The only way it will work is if you do not use a baseUrl.

Re: Run javascript from Image Link URL

Thanks Steven, that clears things up.