# Passing variables from swf to javascript popup

**URL:** <https://forum.kirupa.com/t/passing-variables-from-swf-to-javascript-popup/299855>\
**Category:** Uncategorized\
**Created:** [November 11, 2009, 10:28pm UTC](https://forum.kirupa.com/t/passing-variables-from-swf-to-javascript-popup/299855 "2009-11-11T22:28:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![turmoil](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@turmoil](https://forum.kirupa.com/u/turmoil)\
**Post date:** [November 11, 2009, 10:28pm UTC](https://forum.kirupa.com/t/passing-variables-from-swf-to-javascript-popup/299855/1 "2009-11-11T22:28:36Z")

</div>

[SIZE=2]hi everyone.  
i`m trying to send variables from this .swf on level2 of the main movie to another swf that loads onto a javascript popup. i`ve tried using the GET and POST methods with no success.

the popup script, first layer:

\_root.btn.onRelease = function() {  
address = “E01\_p.swf”;  
target\_winName = “test\_pop”;  
width = 600;  
height = 518;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
//sends data back to the function  
openWinCentre(address,target\_winName,width,height,toolbar,location,directories,status,menubar,scrollbars,resizable);  
};

second layer:

\_root.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {  
getURL(“javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open(’”+url+"’,’"+winName+"’,’"+“width=”+w+",height="+h+",toolbar="+toolbar+",location="+location+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",top=’+((screen.height/2)-("+h/2+"))+’,left=’+((screen.width/2)-("+w/2+"))+’"+"’)}else{myWin.focus();};void(0);");  
};

thank you.  
[/SIZE]
