Hello, Ray,
thanks for your reply.
I resumed one of your last post and solved the problem.
Basically I updated the onchange event so that it runs an additional function (bootstrapInit) every time it is fired;
then I created a function named boostrapInit that does the js code.
It works now.
Just a question: does the FRAMEWORK_LOAD_PLUG IN supports more that one additional parameter (in my example 'bootstrapInit')?
Is there any documentation abot the framework plug-in? i.e.: parameters, methods...
Here is the code I used succesfully, for others to help:
ONCHANGE EVENT
changed from:
onChange="framework_load_plugin_url('plugins/inc.pv.php',document.getElementById('registrazione_frm'),'pv','','')
to:
onChange="framework_load_plugin_url('plugins/inc.pv.php',document.getElementById('registrazione_frm'),'pv','','', bootstrapInit)
JS FUNCTION:
<script>
function bootstrapInit() {
if ($("#field2").val() == '14') {
$("#field3").prop( "disabled", false );
} else {
$("#field3").prop( "disabled", true );
$('#field3').val('')
}
$('select[name=tipo_field2]').change(function () {
if ($("#field2").val() == '14') {
$("#field3").prop( "disabled", false );
} else {
$("#field3").prop( "disabled", true );
$('#field3').val('')
}
});
$('select[name=field2]').change(function () {
if ($(this).val() == '14') {
$("#field3").prop( "disabled", false );
} else {
$("#field3").prop( "disabled", true );
$("#field3").val('')
}
});
};
</script>