Good Afternoon, I have been trying to modify the following code (originally used to hide or show an input filed based on dropdown selection), I am trying to utilize this to change an image source based on the dropdown selection.
The code works great for a field, but I am trying to use it to change an image source.
I have been trying to utilize the getElementById function, but I do know know if this function will work inside of the custom JavaScript fields on my 'Portal Management". I have been watching many hours of tutorials on basic JavaScript to make this work. However, I do not know if all JavaScript works inside "portal management" .
Is there any documentation of what we can and cannot utilize within the "Custom Javascript" on the "portal management app"?
Any help would be appreciated - Thank you in advance.
Elizabeth S.
Code I am trying to modify:
$(document).ready(function () {
$("#move_acctreq2").change(onDisplaySectionChange);
onDisplaySectionChange();
});
function onDisplaySectionChange() {
var varManuf = $('#move_acctreq2').find("option:selected").text();
if (varManuf === "Yes") {
$('#move_test').parent().parent().show();
}
else {
$('#move_test').parent().parent().hide();
}