PDA

View Full Version : lightbox with flash variables problem...



25mgHaldol
July 6th, 2007, 01:45 PM
i am having a problem passing a variable in flash to a javascript function that calls lightbox based on the variable passed to it by flash.

the flash code is:

getURL("javascript:show(" + w + ")");


the javascript is:

function show(url) {
var a = document.getElementById('dummyanchor');
a.setAttribute('href',url);
myLightbox.start(a);
}

if i pass it a url, it works fine. when i use the variable i am getting a "invalid flag after regular expression" error.

Any help would be very much appreciated.

Thanks in advance.

25mgHaldol
July 6th, 2007, 02:04 PM
problem fixed...

disregard.

thats all folks
July 6th, 2007, 02:59 PM
just wondering what the solution was? Might help others

25mgHaldol
July 11th, 2007, 07:24 PM
I was missing a pair of missing of single quotes in the javascript call inside flash.

getURL("javascript:show( ' " + w + " ' )");

its been a couple of days, but i think that should work.