Bob, in v3 I have some forms with JS in it
Basically it does the following
When EG)select_2 == Ja, a field will appear in the form.
On "Nee" the field does not show
So...how to set this up in V4??
This the old code
Basically it does the following
When EG)select_2 == Ja, a field will appear in the form.
On "Nee" the field does not show
So...how to set this up in V4??
This the old code
<?
$doc =& JFactory::getDocument();
$script = "window.addEvent('domready', function() {
$('select_2').addEvent('change', function(event) {
var e = new Event(event);
if (e.target.value == 'Ja') {
$('Voornaam').getParent().getParent().setStyle('display', 'block');
} else {
$('Voornaam').getParent().getParent().setStyle('display', 'none');
}
});
});";
$doc->addScriptDeclaration($script);
?>