Results 1 to 2 of 2

Thread: Dynamically assign a variable to a function (hopefully from Flash?)

  1. #1
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamically assign a variable to a function (hopefully from Flash?)

    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:

    Code:
    <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:

    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!

  2. #2
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •