web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Can I change image source using custom javascript

(1) ShareShare
ReportReport
Posted on by 5

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();

    }

  • M.Anas Profile Picture
    35 on at

    You can modify html and java script in custom java script section

    this link will help you.

    carldesouza.com/.../

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 98 Most Valuable Professional

#2
11manish Profile Picture

11manish 77 Super User 2026 Season 2

#3
Travis South Profile Picture

Travis South 39

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans