web
You’re offline. This is a read only version of the page.
close
Skip to main content
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();

    }

I have the same question (0)
  • M.Anas Profile Picture
    35 on at
    RE: Can I change image source using custom javascript

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 113 Super User 2025 Season 2

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 104

#3
#ManoVerse Profile Picture

#ManoVerse 56

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans