PDA

View Full Version : I can't get a default value for my comboBox?


dotCom_flasher
03-01-2007, 01:15 PM
I have created a small form that will populate a URL chain. The only problem is, the default URL does not contain certain values, so if the user DOESN'T interact with a combo box, and still hits the "GO" button, they get an error page.

Is there a way that I can create a default value for my combo box, so that the value is pre-assigned?

What about some sort of "if" statement? Can I write an "if" statement within a on(release) function? something like....if( user doesn't select a value) getURL (URL1) } if (user DOES select a value) getURL(URL2)?

help!!! I need a solution ASAP!

dotCom_flasher
03-01-2007, 01:39 PM
here is the code I'm using to get the value from the combo box. Is there some way I can tell flash to insert a value until the user changes it?

//Question 1

function comboDisplay (component) {
item = component.getSelectedItem().data ;
}
comboBox.setChangeHandler ("comboDisplay") ;

dopefries
04-16-2007, 09:16 PM
Have you tried this before you populate the cb?


combobox.addItemAt(0, "Please Select..");