-
Help with passing variables
Hi there....
I am using the following snipet of action script to open swf file in a new pop up window after an item has been selected from a list box........
function SelectItem()
{
var newWindow = window.open();
receiver = listBox.getSelectedItem().data["onlineuser"];
getURL("javascript:var newWindow=window.open ('http://www.webaddress/messagewindow.swf?receiver','as4d','width=325,heig ht=325')");
}
The variable 'receiver' is selected from a listbox by a user.
I want to pass the value stored in 'receiver' to the messagewindow.swf that is included in the geturl statement.
Can someone shed some light on how I can do this please.
Thanks for your help
-
errors =
*javascript should be written without spaces
* no in the getURL funct, do NOT use var before your variable.
check your output window when testing in flash F11, this should indicate where you made mistakes
cheers
-
Help with passing variables
Thanks sidewalk...
The spacing was a typo when I modified what I copied into the message window after I'd done the post...
Anyway got it sorted out... this is the coding I ended up using:
getURL("javascript:var newWindow=window.open('http://webaddress.com/testarea/messagewindow.swf?receiver=" + username + "','as4d','width=500,height=350')");
-
happy to be of help.
still do not use the var inside the command.
using var will define the variable again, so that"s useless code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|