Topic: Linkurl and jquery javascript

Hi

I'm having problems getting the linkurl to display a javascript popup using Fancybox

I've checked the code and it works fine with a standard link in the html body, but when clicking the link on the reverse side the linked content loads up on a new page (despite what linkTarget used)

I've had a good look around the forum, and google, and am completely stuck

Has anyone managed to get something similar working, ie calling a javascript function from the linkurl in the xml file?

Any help is appreciated

rich

Re: Linkurl and jquery javascript

To specify the window target, use the 'linkTarget' Pro option: http://www.airtightinteractive.com/proj … tions.html

Felix Turner
SimpleViewer Support Team.

Re: Linkurl and jquery javascript

Hi Felix, I don't think it's the target window that's causing the problem. And, I've tried with the various pro options

I've added the below code to the head tags...

<script type="text/javascript" src="../jquery.fancybox/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../jquery.fancybox/jquery.easing.1.3.js"></script>
    <script type="text/javascript" src="../jquery.fancybox/jquery.fancybox-1.2.1.pack.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("a").fancybox();
        });
    </script>


And the below code in the body tags...

<a title="Sample title" href="1_b.jpg"><img src="1_s.jpg" /></a>

...which works fine (ie over the top of the content) But when adding the linkurl as the image, this just opens in a new window

I've seen a few people have got the linkurl working with php, yet am stuck trying to get this working for the javascript function??

Any ideas?

rich

Re: Linkurl and jquery javascript

To call a JS function when clicking the link button, set the image's linkurl to something like: "javascript:myFunction()". Then set the "linkTarget" option to "_self" in the config options.

Felix Turner
SimpleViewer Support Team.

Re: Linkurl and jquery javascript

"javascript:myFunction()"  would call the function itself, but how would I combine that with an image or htm file link, so it would load the content over the tiltviewer (as it does in html)?

Sorry Felix, but as you can probably tell, i'm not a coder, but I would really appreciate if you could help me to get these two bits of code talking to each other?

rich