A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: getUrl

  1. #1
    anyone know how to use getUrl to send varibles to the formMail cgi script...

    my script works fine with an html form, just can't seem to simulate it in flash.... i'm probably doing something really stupid!

    any ideas?

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    910
    Hi minkey....try using "loadVariables".......something like this...

    loadVariables ("http://www.yourDomain.com/cgi-bin/myScript.cgi", "", "GET");

    Hope this helps...

    -pg-

  3. #3
    Member
    Join Date
    Jan 2002
    Location
    Venice, CA
    Posts
    77
    --I'm assuming that you want to SEND variables not get them... so therefore, you're on the right track with the getURL() function... I won't go into depth about the difference between the "GET" and the "POST" method of submission, but here's what you're looking to do:

    getURL ("theTargetCgiURL", "theTargetWindow", "GET");

    or

    getURL ("theTargetCgiURL", "theTargetWindow", "POST");

    snarf,
    brian
    [Edited by monogrey on 01-10-2002 at 10:34 PM]

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    910
    Well....(paraphrased from ASDG by Colin Moock)"even though the name "loadVariables" suggests a single direction of variable transmission, it can also be used to "send" variables to a server-side script....."

    ...and you're right "getURL" can do the same...

    "however,if you were expecting any reply or information back from the script (ie. verifying correct information submitted or whatever).....information returned sent by a script called by "getURL()" will be displayed as regular web content in the browser, not in Flash.......to get the results of a script execution into Flash.....use "loadVariables"

    ....which is why I suggested "loadVariables()".....I use it all the time....works great....

    Hope this helps....

    -pg-


    [Edited by pigghost on 01-10-2002 at 11:45 PM]

  5. #5
    Member
    Join Date
    Jan 2002
    Location
    Venice, CA
    Posts
    77
    point and counter point.
    btw... that helps to resolve a DB/Flash interaction issue I've been asked to address. arigatogozaimas.

    touche$B!-(J,
    brian.
    [Edited by monogrey on 01-11-2002 at 12:28 AM]

  6. #6
    basically i want to simulate the following HTML in flash...?

    // HTML
    <form action="/cgi-bin/FormMail.pl" method="POST">
    <input type="submit" value="Submit" align="middle">
    <input type=hidden name="recipient" value="jonathan@trnsfrmr.com">
    <input type=text name="email">
    <input type=text name="realname">
    <input type=hidden name="redirect" value="http://trnsfrmr.com/index.html">
    <input type=hidden name="env_report" value="REMOTE_HOST, REMOTE_ADDR, REMOTE_USER, HTTP_USER_AGENT">
    </form>
    // END

    so i guess the main question is how to configure getUrl to send the variables?

  7. #7
    Senior Member
    Join Date
    Sep 2000
    Posts
    910
    Okay....I think this tutorial by Jeffrey Hill will explain in more detail than I can on this board...about how to set up a form in Flash.....It's one of the better tutes I've seen on the subject.....covers all the bases...has a downloadable .fla for hands-on....shows you how to validate information in Flash....and gives you a choice of scripts to use...Perl, PHP, or ASP....it's really pretty comprehensive....

    http://www.flashkit.com/tutorials/Dy...58/index.shtml

    Hope this helps....

    -pigghost-

    EDIT: Monogrey, just curious...what is "arigatogozaimas"???


    [Edited by pigghost on 01-11-2002 at 09:08 AM]

  8. #8
    thanks a lot, that tute should cover it.

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