LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-30-2005, 09:24 AM
ugreen9 ugreen9 is offline
Registered User
 
Join Date: Oct 2004
Location: Amsterdam
Posts: 2
Rep Power: 0
ugreen9 is on a distinguished road
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".

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:

Code:
<FORM METHOD="post" ACTION="/cgi-bin/mail-a-form" NAME="emailForm">
		
<INPUT TYPE="hidden" NAME="to" VALUE="Me@xs4all.nl">
<INPUT TYPE="text" NAME="from" value="">
<INPUT TYPE="hidden" NAME="subject" VALUE="Formulier verstuurd vanaf leodesign.nl">
<INPUT TYPE="hidden" NAME="missing" VALUE="http://www.xs4all.nl/~accountname/missing.html">
<INPUT TYPE="hidden" NAME="nextpage" VALUE="http://www.xs4all.nl/~accountname/nextpage.html">
		</FORM>
This is the code i created for in my html:

Code:
<SCRIPT LANGUAGE="javascript">
function subMitEmail(emailAdress)
	{
		var email = emailAdress
		document.forms.emailForm.from.value = email
		document.forms.emailForm.submit();
		window.status="je emaildress(" + email + ") is verstuurd aan Me@xs4all.nl"
	};
</script>
in actionscript i use:

Code:
getURL("javascript:subMitEmail(" + email + "," + emailName +")", "_SELF","POST");
edit: ok my getURL was wrong to begin with, anybody now how to workaround that my provider isn't accepting the from field set to 'hidden'?

Thanks in advance,

Berry.

Last edited by ugreen9 : 07-31-2005 at 04:00 PM
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The News From Adobe on the Future of Flash Platform FlashMove Chit Chat Lobby 0 11-10-2011 09:55 AM
My Flash and JavaScript don't like each other. BlackHatHunter Flash MX 2004 4 07-25-2006 06:15 PM
Flash Video Encoder Compare flashfever2nd New Softwares 1 05-20-2006 03:46 AM
passing variable from php to flash ashuraj2163 Flash MX ActionScript 3 11-30-2005 07:44 PM
Flash, Javascript, Do something on variable change... Splitz Flash MX 2004 7 04-20-2005 11:58 AM




All times are GMT. The time now is 09:58 AM.