PDA

View Full Version : combobox initial item combobox


jerryj
01-09-2006, 08:52 PM
Hi,

I have this code on a submitbutton.
'droptext' is a combobox. It works fine, except for the initial state of it all. I mean, I have to select one of the items in the combobox, before I can make it work. Sending the default item (getValue == 1) only works when it is selected after another item has been selected.

on (release) {
var result_lv = new LoadVars();
if (droptext.getValue() == 1) {
result_lv.mytitle1 = field.text;
}
if (droptext.getValue() == 2) {
result_lv.mytext1 = field.text;
}
if (droptext.getValue() == 3) {
result_lv.mytitle2 = field.text;
}
if (droptext.getValue() == 4) {
result_lv.mytext2 = field.text;
}
result_lv.sendAndLoad("write2.php", result_lv, "POST");
}

What should i change or add?

Thanks,

Jerryj.