A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: sending variables HTML form

  1. #1
    Junior Member
    Join Date
    May 2002
    Posts
    26

    sending variables HTML form

    I have a flash movie and when the user clicks on a button in the movie a pop-up window opens containg a form.

    I was wondering if it's possible to fill in
    one of the fields in the form when the user click on the button that opens the window.

    So user clicks button, pop-up opens, first field in the form already has name in it sent from the flash file.

    Any suggestions, preferbly very easy ones that don't involve cgi or xml

  2. #2
    You will probably have to be using some sort of scripting language, but it can be something easy and straightforward like ASP or PHP. You can just pass the value you want filled in at the end of your url:

    GetURL("popupForm.asp?firstName=" + firstName, "_blank");

    Then in whatever scripting language you can just put the value into the field. If you are using PHP this would work something like this:

    <input type="text" name="firstName" value="<?=$HTTP_GET_VARS['firstName'];?>" maxlength="32" size="32">

    That should do it, and I can't think of any way to do it without a scripting language, or something more complicated with javascript.

  3. #3
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    you can do that with javascript too: if a html page is called as x.html?y=z, the location.search property will be ?y=z
    YOu can use this to set the value of a html form element or document.write that to another movie's embedding

    Musicman

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