PDA

View Full Version : Resolved Dynamically assign a variable to a function (hopefully from Flash?)



JDesch44
11-14-2008, 04:16 PM
Hi all. I apologize in advance for the simplicity of my question, but I am very new to JavaScript and haven't quite figured everything out yet. My question is this, though. I have a function on my page that needs to have (what I assume are) variables assigned to it in order to execute. It looks like this:


<script type="text/javascript">
function openLightbox() {
myLightWindow.activateWindow({
href: 'quote.html',
type: 'external',
title: 'QUOTE REQUEST',
height: 400,
width: 800
});
}
</script>

I'm able to call this from flash no problem, but what I would like to be able to do is to dynamically assign the href, title, height and width from Flash, so I don't have to duplicate my JavaScript function for all the times that I'm going to need to call it just to assign a new link, title, height and width. Here's how I call it from Flash:
Code:


on (release) {
getURL("javascript:openLightbox()");
}

I'm sure its possible, but like I said, I'm pretty new to this whole JavaScript business, so any help anyone could provide would be very beneficial. Thanks in advance!

JDesch44
11-14-2008, 06:00 PM
Nevermind:

http://www.webdeveloper.com/forum/showthread.php?&t=195085&is_resolved=1