PDA

View Full Version : (ASP) openWindow



Ariela
February 29th, 2004, 09:59 AM
Hi,
I used the instructions to build a form in ASP and FLASH from this site (Flash Forms and Database Integration) and it works great!.

BUT:
The only thing i wanted to change is that the details shown to the viewers will pop up with a nice window like this :
function openWindow(URL)
{
newWindow=window.open(URL, 'a', 'scroll=1, toolbar=0, location=0, directories=0, status=0, menubar=0, width=400, height=300, left='+(((screen.width-800)/2)-100)+', top='+((screen.height-500)/3)+'')
}

the URL should be the ProcessForm.asp.
insted of:
getURL("../atar_via/processForm.asp",0, "POST");

I write
getURL("javascript:openWindow '../atar_via/processForm.asp'",0, "POST");

but it dosn't work...
WHY??

Thanks
Ariela

abzoid
February 29th, 2004, 10:40 AM
You're trying to get Flash to execute Javascript, and it won't do that. What you'll need to do is create a small Javascript OpenWindow function and place that in the HEAD of the HTML page that contains your Flash movie. Then call that function from the Flash movie using getURL.

Ariela
February 29th, 2004, 11:07 AM
Hi
Thank you for your response.

The function of course is in the HTML page and not in the FLA file.

the question is why dose it work in a "_blank" window but not through the openwindow function.

Thanks
Ariela

abzoid
February 29th, 2004, 11:28 AM
Have you tested the OpenWindow function with a text link in the HTML page to make sure it is working properly?

Ariela
February 29th, 2004, 11:42 AM
yes.

when I write:
getURL("javascript:openWindow('../atar_via/processForm.asp'",0, "POST");

it opens a regular window with an error and the name of the function in the address bar...


when i write:
getURL("javascript:openWindow('../atar_via/processForm.asp')");

It opens the window correctly but dos'nt send the details or the mail...

abzoid
February 29th, 2004, 11:45 AM
Hmm, sounds like a Flash URLencode issue.

Ariela
February 29th, 2004, 11:57 AM
What dose it mean?
In hebrew please...

abzoid
February 29th, 2004, 12:10 PM
Flash is likely encoding the parameters into a format that the function cannot access. Perhaps one of the Flash gurus will drop by with a solution.

Ariela
February 29th, 2004, 12:21 PM
OK. got it.

Thank you very much
Ariela