A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [RESOLVED] [F8] send form through a 3rd party mail service

  1. #1
    Senior Member drn33's Avatar
    Join Date
    Mar 2006
    Posts
    104

    resolved [RESOLVED] [F8] send form through a 3rd party mail service

    Good afternoon all. I am trying to send the contents of a Flash form to iContact, which is a 3rd party email management service. My form works fine when I write my own PHP script, but I can't get it to show up in iContact. There are fixed variables that I have to send onSubmit that tell iContact where to post, but one variable caught my eye. It is:

    specialid:26395 = "ACQQ";

    Because of the colon after "specialid", I can't send this as a variable in Flash. Has anyone tried to send a Flash form through a 3rd party service and have any insight? Or does anyone know how to get that variable with the colon to post onSubmit?

    I was thinking worst case scenario I could pass everything into my own php script, then pass it into iContact from there, since it works in html. But I have never written a pass through script.

    Any ideas would be helpful. My onSubmit code is below. Maybe I am missing something? Thanks in advance for your help.

    Code:
    on (release) {
       if (!email.length || email.indexOf("@") == undefined || email.indexOf(".") == -1) {
          EmailStatus = "Please enter a valid E-mail address";
     }
       else {
            //copying the entered variables into the variable names required by iContact
    	fields_name = name; 
    	fields_country = country;
    	fields_postcode = postcode;
    	fields_email = email;
    	fields_emailformat = emailformat;
    	listid = 26390;     // below are the fixed variables required by iContact to recognize the account
            specialid:26390 = "ACQQ"; //Flash won't let me pass this one
    	clientid = 202700;
    	formid = 2300;
    	reallistid = 1;
    	doubleopt = 1;
    	sc_project=3838100; 
    	loadVariables ("http://app.icontact.com/icp/signup.php", this, "POST");
    	EmailStatus = "Sending... Please wait";
     }
    }
    Last edited by drn33; 07-23-2008 at 12:39 PM.

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    PHP Code:
    this["specialid:26390"] = "ACQQ"

  3. #3
    Senior Member drn33's Avatar
    Join Date
    Mar 2006
    Posts
    104
    Thank you for the reply Moagrius. This worked for passing the variable out of Flash! iContact still won't recognize my script though. But at least that variable works. If anybody sees an error with my script, please let me know. Otherwise I will try to solve it directly with iContact.

  4. #4
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    try loadVars
    PHP Code:
    on (release) {
       if (!
    email.length || email.indexOf("@") == undefined || email.indexOf(".") == -1) {
          
    EmailStatus "Please enter a valid E-mail address";
     }
       else {
            
    //copying the entered variables into the variable names required by iContact
    var loader = new LoadVars();
        
    loader.fields_name name
        
    loader.fields_country country;
        
    loader.fields_postcode postcode;
        
    loader.fields_email email;
        
    loader.fields_emailformat emailformat;
        
    loader.listid 26390;     // below are the fixed variables required by iContact to recognize the account
            
    loader["specialid:26390"] = "ACQQ"//Flash won't let me pass this one
        
    loader.clientid 202700;
        
    loader.formid 2300;
        
    loader.reallistid 1;
        
    loader.doubleopt 1;
        
    loader.sc_project=3838100
        
    loader.sendAndLoad ("http://app.icontact.com/icp/signup.php"loader"POST");
        
    EmailStatus "Sending... Please wait";
     }


  5. #5
    Senior Member drn33's Avatar
    Join Date
    Mar 2006
    Posts
    104
    That worked!!!!!

    Moagrius, thank you VERY much for taking the time to modify my code. I will remember this for future Flash forms. I always appreciate the great help I get on this forum.

  6. #6
    Senior Member drn33's Avatar
    Join Date
    Mar 2006
    Posts
    104
    BTW, how do I show this thread as resolved?

  7. #7
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    yw, and: at the top of the thread, click "THREAD TOOLS" > "MARK THREAD AS RESOLVED"

  8. #8
    Senior Member drn33's Avatar
    Join Date
    Mar 2006
    Posts
    104
    Perfect, thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center