Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Unanswered

Can I change image source using custom javascript

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

    }

Categories:
  • M.Anas Profile Picture
    M.Anas 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,556 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,625 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans