I need to submit a form to different URLs based on the value of a select field, this is what I have that is not working.
What am I missing?
window.addEvent('domready', function() {
$('gender').addEvent('onchange', function() {
if('gender'.value=='male') {
document.id('chronoform_consultation-Copy').action ='male.html';
} else {
document.id('chronoform_consultation-Copy').action ='female.html';
}
});
});
What am I missing?