A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Sending form information to CGI script

  1. #1
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    Sending form information to CGI script

    I am using Flash MX 2004, I am created a web site completely in flash and i have a form I wish to send to a CGI script. I have this working in HTML. How do I send the information to the cgi? Is there a way to use the html form code?
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    It's similar.
    The CGI script expects variables with predifened names.
    In HTML, for example, these names are the names of text fields.

    In Flash, you use the LoadVars Class to send/send and load the variables.
    For example:
    code:

    my_lv = new LoadVars();
    my_lv.firstName = "nuno";
    my_lv.lastName = "mira";
    my_lv.send("myScript.cgi");


    Instead of send(), you may use sendAndLoad(), in case the script outputs anything.

    In this case, you're sending two variables with the names: firstName and lastName.

    For more details read loading variables.

  3. #3
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    THANKS

    Thank you so veryt much
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

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