Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-12-2008, 10:58 AM   PM User | #1
chin_master
New to the CF scene

 
Join Date: Nov 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
chin_master is an unknown quantity at this point
Calling jQuerys lightbox from function

I am trying to launch jQuerys lightbox via a function called by flash. Example:http://www.campbelltest.co.uk/britis...ueryFinal.html

I previous had this working with Lightbox2 by Lokesh Dhakar using the function below:

Code:
function openLightbox(url,group){
	trace("url"+ url)
	var objLink = document.createElement('a');
	objLink.setAttribute('href',url);
	objLink.setAttribute('rel','lightbox['+group+']');
	objLink.setAttribute('title','caption');
	Lightbox.(objLink);
}
Now I'm trying to make it work with jQuery Lightbox Plugin (balupton edition). I have modified my code to the below to try and launch the light box but without any success.

Code:
function openLightbox(url,group){
	var objLink = document.createElement('a');
	objLink.setAttribute('href',url);
	objLink.setAttribute('rel','lightbox['+group+']');
	objLink.setAttribute('title','caption');
	jQuery.Lightbox.init(objLink)
};
I have setup two trace commands on the init function to monitor what is happening when the function is called using http://v2.easy-designs.net/code/jsTrace/. When you click one of the static links on the bottom of my examples page the trace command returns the variables:
image=http://www.campbelltest.co.uk/britishMuseum/online/images/image-statue.jpg
images=[object Object]

To get flash to call the function you have to click one of the 'enlarge image' buttons, one of which can found if you navigate in the flash to '2 Outer room - central view'>'A. Offering for Nebamun'. The trace function on the two variables comes back as
image=http://www.campbelltest.co.uk/britishMuseum/online/images/image-offering.jpg
images=undefined

Does anyone have an idea of how I should be calling this function or if I'm on the wrong track??

Thanks in advance,
C
chin_master is offline   Reply With Quote
Reply

Bookmarks

Tags
flash, function, jquerys, lightbox, [object object]

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:29 PM.


Advertisement
Log in to turn off these ads.