# Flash and Javascript

**URL:** <https://forum.kirupa.com/t/flash-and-javascript/259200>\
**Category:** Uncategorized\
**Created:** [May 1, 2008, 11:01pm UTC](https://forum.kirupa.com/t/flash-and-javascript/259200 "2008-05-01T23:01:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukipella](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lukipella/32/800_2.png) [@lukipella](https://forum.kirupa.com/u/lukipella)\
**Post date:** [May 1, 2008, 11:01pm UTC](https://forum.kirupa.com/t/flash-and-javascript/259200/1 "2008-05-01T23:01:57Z")

</div>

Hi Guys

I am calling a javascript function from inside flash:

getURL(“javascript:LightboxDelegate(‘evnt.target.d ata’,‘Poster one’)”);  
Where ‘evnt.target.data’ is variable set in an xml file.

When I trace(evnt.target.data); I get data from the xml file correctly but the getURL is not replacing ‘evnt.target.data’ with its proper content so it is sending:

[[COLOR=#22229c]http://www.wethnk.com/demo/focusmar/evnt.target.data[/COLOR]](http://www.wethnk.com/demo/focusmar/evnt.target.data) to the browser could someone please point out whats wrong with my syntax why it is being read as a string.

when I removed the quotes to read:

getURL(“javascript:LightboxDelegate(evnt.target.da ta,‘Poster one’)”);

I get a javascript error and the lightboxx ++ is not even triggered.

if you click the enter button though it triggers the lightbox++ but does not load anything as the its reading the evnt.target.data as the end of the url rather than the image.

see what I mean here: [[COLOR=#22229c]http://www.wethnk.com/demo/focusmar/[/COLOR]](http://www.wethnk.com/demo/focusmar/)
