adamcasey
04-24-2008, 09:58 AM
Hi there, I'm attempting to create some actionscript that stops my form from being sent, if the user has not selected a county from my forms combo box. Currently my script looks like this:
Actionscript sitting on my forms timeline:
function onComboChange (event)
{
var index = countyCOMBO.selectedIndex
if(countyCOMBO.selectedItem=="Select a County"){
feedback._option = undefined;
}else{
feedback._option = index;
}
}
Actionscript sitting in external actionsript file which sends a warning message to the users if they have failed to select a county from the combo box:
...
function set _option (args)
{
option = args;
}
function get _option ()
{
return option;
}
...
function validation ()
{
...
} else if (_option == undefined) {
error = 'Oops! no location selected';
o.showMistake (o.countyCOMBO._y);
}
...
You can checkout my form by navigating to my test site
www.tees.me.uk/booknew (http://www.tees.me.uk/booknew)
NOTE: Once there navigate to page 27 to be able to view the form.
Actionscript sitting on my forms timeline:
function onComboChange (event)
{
var index = countyCOMBO.selectedIndex
if(countyCOMBO.selectedItem=="Select a County"){
feedback._option = undefined;
}else{
feedback._option = index;
}
}
Actionscript sitting in external actionsript file which sends a warning message to the users if they have failed to select a county from the combo box:
...
function set _option (args)
{
option = args;
}
function get _option ()
{
return option;
}
...
function validation ()
{
...
} else if (_option == undefined) {
error = 'Oops! no location selected';
o.showMistake (o.countyCOMBO._y);
}
...
You can checkout my form by navigating to my test site
www.tees.me.uk/booknew (http://www.tees.me.uk/booknew)
NOTE: Once there navigate to page 27 to be able to view the form.