Hi to all,
I have a problem using Internet Explorer (v.8 +) with a text box that has to be required or not depending on the value of a drop-down menu.
Text box has id = "ans_id" and drop-down menu has id = "status".
I have inserted in a "Load JS" the following code:
Everything works fine at least with Firefox and Chrome, but using Internet Explorer (as usual...) the field "ans_id" does not become required, so users are able to submit without filling the text box.
What can I try to make it working???
Thanks in advance
Alessandro
I have a problem using Internet Explorer (v.8 +) with a text box that has to be required or not depending on the value of a drop-down menu.
Text box has id = "ans_id" and drop-down menu has id = "status".
I have inserted in a "Load JS" the following code:
window.addEvent('domready', function() {
$('status').addEvent('change', function() {
if ( $('status').value == 'some-value' ) {
$('ans_id').setProperty('required', 'required');
} else {
$('ans_id').setProperty('required');
}
});
});
Everything works fine at least with Firefox and Chrome, but using Internet Explorer (as usual...) the field "ans_id" does not become required, so users are able to submit without filling the text box.
What can I try to make it working???
Thanks in advance
Alessandro