Passing variable from flash to javascript then to cgi

Hi,

I can’t figure this out, hope someone can help me out.
I have a email-form in flash (mx 2004).
I have a website at xs4all, a basic account and this provider does not allow the use of php with this account.

But they do offer the use of a cgi-script (mail-a-form,they call it,you can’t edit it)
This is all perfectly working if you use the HTML-code they provide, most important that you use FORM METHOD=“post”, I tried to send the needed variable(s) directly from within flash but I got an error back the it wasn’t using the FORM METHOD=“post”. thingy

So i thought I just pass the email variable from flash <with getUrl> to a javascript function and from there place them in this form and submit it with the same function…;

This is the code for the form in my index.html in the body:

 
<FORM METHOD="post" ACTION="/cgi-bin/mail-a-form" NAME="emailForm">
<INPUT TYPE="hidden" NAME="missing" VALUE="[http://www.xs4all.nl/~accountname/](http://www.xs4all.nl/~accountname/)">
<INPUT TYPE="hidden" NAME="from" value="">
<INPUT TYPE="hidden" NAME="subject" VALUE="email sent after website visit">
<INPUT TYPE="hidden" NAME="to" VALUE="[email="myname@xs4all.nl"]myname@xs4all.nl[/email]">
<INPUT TYPE="hidden" NAME="required" VALUE="from">
</FORM>

[size=1]
[/size]

This is the code i created:

 <SCRIPT LANGUAGE="javascript"> 
function subMitEmail(email,emailName){
 
var email = email
var name = emailName
document.emailForm.from.value = name
document.emailForm.required.value = email
document.emailForm.submit(); 
};
</script>

in actionscript i use:

   
getURL("javascript:subMitEmail(" + email + "," + emailName +")", "_SELF","POST");
 

[size=2]In the javascript function I tried to use document.emailForm.from.write(email) but with no succes either. I think i am close to a solution but don’t know what to do anymore, any suggestions???[/size]

Thanks in advance,

Berry.