Make a Flash Contact Form Function Correctly

  • geno369329
  • Beginner
  • Beginner
  • User avatar
  • Joined: Sep 29, 2008
  • Posts: 44
  • Status: Offline

Post September 30th, 2008, 3:28 pm

Thanks I'll check it out
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 30th, 2008, 3:28 pm

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 30th, 2008, 6:15 pm

I'll send you his FLA tomorrow in PM graphixboy if he hasn't got it by then. I think I ended up using loadVarsNum because I run a Windows server, but it works for me perfectly. The code I posted is the code currently in place at my Alaron site in my sig.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 30th, 2008, 6:25 pm

hmmmmm sandbox security rule? http://www.ultrashock.com/forums/flash- ... 76238.html
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 30th, 2008, 6:48 pm

another thought and this could well be the reason it works for me and not geno. Using loadVarsNum is typically used when loading vars into a different level which I'm doing. so graphixboy's suggestion of sendAndLoad might be the better alternative.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • geno369329
  • Beginner
  • Beginner
  • User avatar
  • Joined: Sep 29, 2008
  • Posts: 44
  • Status: Offline

Post September 30th, 2008, 8:11 pm

This is the code thats in the example graphicboy gave me. where would I put this code? would I make another PHP file to put it in or what!!


Code: [ Select ]
var emailServer:String = "http://server.com/email.php"
 
var request:LoadVars = new LoadVars();
var response:LoadVars = new LoadVars();
    response.onLoad = showResult;
 
/************************
Server Request
************************/
function sendEmail():Void{
    request.name = "chrisaiv";
    request.email = "blah@blah.com";
    request.url = "http://sendtoafriend";
    request.sendAndLoad(emailServer + "?clearCache=" + new Date().getTime(), response, "GET");
 
    //Show data sent
    for (var prop in request){
        //trace( request[prop] + newline);
    }
}
 
/************************
Server Response
************************/
function showResult():Void{
    if (this.success) {
        trace("File path: " + this.success);
    }
}
 
sendEmail();
  1. var emailServer:String = "http://server.com/email.php"
  2.  
  3. var request:LoadVars = new LoadVars();
  4. var response:LoadVars = new LoadVars();
  5.     response.onLoad = showResult;
  6.  
  7. /************************
  8. Server Request
  9. ************************/
  10. function sendEmail():Void{
  11.     request.name = "chrisaiv";
  12.     request.email = "blah@blah.com";
  13.     request.url = "http://sendtoafriend";
  14.     request.sendAndLoad(emailServer + "?clearCache=" + new Date().getTime(), response, "GET");
  15.  
  16.     //Show data sent
  17.     for (var prop in request){
  18.         //trace( request[prop] + newline);
  19.     }
  20. }
  21.  
  22. /************************
  23. Server Response
  24. ************************/
  25. function showResult():Void{
  26.     if (this.success) {
  27.         trace("File path: " + this.success);
  28.     }
  29. }
  30.  
  31. sendEmail();
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 30th, 2008, 8:39 pm

no don't use that. That's ASP code. you are using php. I'll look at your FLA in the AM and send the link for it to graphixboy in case he wants to check it out. Can't do it now cause I saved it to a network drive which I don't have access to at the moment.

//edit strike that - it's not ASP code but sure looked like it at a glance, but it'll just mess up your template. so still don't use it. I just looked at the example link he posted. It'll confuse the hell out of everything you've got going. Good code, but you can work around it I'm sure.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • geno369329
  • Beginner
  • Beginner
  • User avatar
  • Joined: Sep 29, 2008
  • Posts: 44
  • Status: Offline

Post September 30th, 2008, 8:44 pm

okay!! I'm gonna call it a night then!!

Have a good night!!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 30th, 2008, 8:57 pm

This is probably a better example of how sendAndLoad works considering your form
http://www.emanueleferonato.com/2008/06 ... ndandload/

Don't even think about copying that into your form. It's just a better example that demonstrates the use, but it has nothing to do with emailing - just educational.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • geno369329
  • Beginner
  • Beginner
  • User avatar
  • Joined: Sep 29, 2008
  • Posts: 44
  • Status: Offline

Post October 1st, 2008, 8:41 am

thanks for the link!! Definitely helpful!!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post October 1st, 2008, 8:45 am

I did look at it this morning and can't put my finger on why mine works and yours doesn't. Unfortunately I'm too busy at work today to give it any more attention and might not get back to this until the weekend. I just sent the link to your FLA to graphixboy in PM in case he has a moment to check it out.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • geno369329
  • Beginner
  • Beginner
  • User avatar
  • Joined: Sep 29, 2008
  • Posts: 44
  • Status: Offline

Post October 1st, 2008, 9:17 am

Thanks! I really appreciate it man!!
  • geno369329
  • Beginner
  • Beginner
  • User avatar
  • Joined: Sep 29, 2008
  • Posts: 44
  • Status: Offline

Post October 1st, 2008, 10:24 am

This is drivin' me crazy!! Anyone else have any advice?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post October 1st, 2008, 10:26 am

graphixboy told me he's taking a look at it. Be patient.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • geno369329
  • Beginner
  • Beginner
  • User avatar
  • Joined: Sep 29, 2008
  • Posts: 44
  • Status: Offline

Post October 1st, 2008, 11:28 am

I don't know if its worth mentioning, but I host my website on yahoo. Could that be affecting my contact box?
  • geno369329
  • Beginner
  • Beginner
  • User avatar
  • Joined: Sep 29, 2008
  • Posts: 44
  • Status: Offline

Post October 1st, 2008, 5:52 pm

I"m finally getting emails...but no confirmation...Wayyyy better than yesterday!!

Thanks Graphixboy and ATNO/TW

you guys are the best ever in the world:)
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post October 1st, 2008, 5:52 pm

Post Information

  • Total Posts in this topic: 62 posts
  • Users browsing this forum: No registered users and 39 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.