variable data form question

  • supermatt22
  • Novice
  • Novice
  • supermatt22
  • Posts: 22

Post 3+ Months Ago

I am pretty new to actionscript and am trying to build a somewhat complicated form.

I have about 10 variables that I need to pass to my CGI script.
Is there a way to give each variable set a name within a list or combo-box, and then
pass the respective variables with the name is chosen?

Basically I want a form with a list and submit button - the user clicks on an item from the list,
clicks submit, and 10 variables are sent to my server.

right now I'm having to type each variable into a text box and click submit (variables sent using
getURL (cgiscript,_post)).

Any help or a point in the right direction would be appreciated.
Or if this is not possible to do, that would be great to know too.
THANKS!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

It always helps if you search this forum first...

http://www.ozzu.com/ftopic74323.html
  • supermatt22
  • Novice
  • Novice
  • supermatt22
  • Posts: 22

Post 3+ Months Ago

I appreciate the reply, but the link you referenced does not mention anything about a list or combo box.
I am able to send form data to my server using text boxes.

I guess what I really want to know how to do is populate multiple text boxes when the user clicks one item on a list.
Multiple items on the list, with each item having a different set of variables to fill into the text boxes.

I will do some more research on my own, but any other input would be appreciated.

Matt
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

so you have it sending data correctly and you just need stuff on the stage to change?

Basically the combo box output is an array. You can have flash tell you the current value with a combobox.change listener. Inside that listener use a case statement to change the textboxes. For example

Code: [ Select ]

switch (ComboBox.selectedItem) {
case "item1" :
// item one is selected
textfield1.text = "something in the textbox";
textfield2.text = "something in the textbox";
break;
case "item2" :
// item two is selected
textfield1.text = "something in the textbox";
textfield2.text = "something in the textbox";
break;
}
  1. switch (ComboBox.selectedItem) {
  2. case "item1" :
  3. // item one is selected
  4. textfield1.text = "something in the textbox";
  5. textfield2.text = "something in the textbox";
  6. break;
  7. case "item2" :
  8. // item two is selected
  9. textfield1.text = "something in the textbox";
  10. textfield2.text = "something in the textbox";
  11. break;
  12. }


I don't have time to write it all out for you but look in the flash help for "comboBox" and "case statement"

Hope that helps

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 9 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.