View Full Version : combo box and push button
UVRgirl
12-20-2004, 09:51 PM
i dont know how to use these component things very well...
so i've got a combo box, and i want to put a list of 5 differnt things that will go to differnt websites in them. and then i have a push button below the combo box that would make it GO TO the place that was selected in the combo box. how do i go about doing that? CONFUSION!
ahh, I'm so stressed about finals and with the holidays and all this business, I just dont have much time! Thanks so much in advance, you are really hellping me out! :)
splict
12-20-2004, 10:13 PM
I'm not sure what part of it you are having trouble with so I'll just show you. This is all pretty much from the manual, so if that didn't help you than this may not either, but you can ask me to explain something specific if you don't understand.
combobox.addItem({label: "ActionScript.org", data: "http://actionscript.org"});
combobox.addItem({label: "Google", data: "http://google.com"});
function changeHandler(evt){
getURL(evt.target.selectedItem.data, "_blank");
}
combobox.addEventListener("change", changeHandler);
KingCHAD
12-21-2004, 01:23 PM
Hi I have the same problem but need the type selected in the combobox to be sent to my php file with the input text fields i have
any ideas
splict
12-21-2004, 01:34 PM
how far have you gotten, KingCHAD? Do you know how to send stuff to php files yet or do you need help with that, too?
KingCHAD
12-21-2004, 01:45 PM
Basically i did the form like this http://www.obscuradesign.co.uk/colingrazierhotel/form1.htm
but after tryin so hard to figure out the components I changed it to this
http://www.obscuradesign.co.uk/colingrazierhotel/form2.htm
so all i need to do is be able to send the data given in the combobox to my php file along with the input text fields
This is my code on the first key frame
mailform = "functionform.php";
action = "";
name = "";
company = "";
add1 = "";
add2 = "";
town = "";
post = "";
tel = "";
email = "";
enquiry = "";
datefrom = "";
dateto = "";
and on the second keyframe is this
loadVariablesNum(mailform, 0);
on the submit button is this code to send the data inputted to my php file
on (release) {
if ((vemail.indexOf("@") != -1) && (vemail.indexOf(".") != -1) && (length(vemail)>5)) {
action = "Send";
loadVariablesNum("functionform.php", 0, "POST");
gotoAndPlay("functionsdone");
} else {
vemail = "Please enter email";
action = "";
stop();
}
}
if you can shed some light on this that would be ace
KingCHAD
12-21-2004, 02:36 PM
I had an idea if you know of a way to get the selected item from my combobox to show up in a dynamic text field then i could send the info the same as the other text fields??????
splict
12-21-2004, 06:13 PM
answered in youir original post. http://actionscript.org/forums/showthread.php3?t=61017
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.