PDA

View Full Version : Combobox Clearing Issue in a form


nite21
07-17-2008, 04:55 AM
hi all i have a combobox gender_cb with values
Select One
Male
Female

Suppose i selected Male and press the submit button the value gets inserted into the database

But my problem is that when the submit btn is pressed all the fields should be cleared
i have cleared my textfield using name_txt.text = "";
but how to make a combobox cleared

any help will be appreciated
thanks

xxneon
07-17-2008, 12:23 PM
you could use

gender_cb.text = ""; to clear the text input box inside the component..

or..

gender_cb.selectedIndex = 0;

which will make the combo box select the first item in the list .. 'Select One'

nite21
07-17-2008, 04:38 PM
you could use

gender_cb.text = ""; to clear the text input box inside the component..

or..

gender_cb.selectedIndex = 0;

which will make the combo box select the first item in the list .. 'Select One'

hi xxneon i used the second one
gender_cb.selectedIndex = 0;
earlier than u
but thanks for replying

nite21
07-17-2008, 04:40 PM
you could use

gender_cb.text = ""; to clear the text input box inside the component..

or..

gender_cb.selectedIndex = 0;

which will make the combo box select the first item in the list .. 'Select One'

hi xxneon i have made the form.fla file with a combobox and its values

im calling this form.fla file in main.fla
but it shows my combobox blank :(

any idea
thanks