PDA

View Full Version : Help with geturl->javascript popup


chuo
01-19-2005, 08:57 PM
Hello all

I have a .fla with some input text fields for emailing

It calls a .php file with the geturl in a _blank target and post methods, then the user closes it and the email goes ok.

BUT, my client does not want a new standard browser window he wants a popup window.

So, i tried this code:

getURL("javascript: openNewWindow('emailer.php','thanks','height=150,w idth=450,toolbar=no,scrollbars=no')","","post");

And the email comes with no data. thats because i cannot pass the variables from my flash to my php popup

How can we do that? :confused:

Thanks

Regards

Gibberish
01-19-2005, 11:25 PM
you have to send the variable along with the getURL.

Try this. left variables are PHP and right variables are Flash, rename as needed.

myBtn.onPress = function () {
varsToSend = new LoadVars();
varsToSend.emailFrom = _root.emailFrom;
varsToSend.emailHeader = _root.emailHeader;
varsToSend.emailBody = _root.emailBody;
varsToSend.getURL("javascript: openNewWindow('emailer.php','thanks','height=150,w idth=450,toolbar=no,scrollbars=no')","","post");
}