- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2014 08:49 PM
Is there any way to change the description and picture when select from a "Select Box"? Thanks.
Solved! Go to Solution.
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2014 02:37 AM
I can give you an idea on how you can do this.
Write an onchange client script on your select box field.
Script:
// Get all the images of your document
var image =document.images;
image[<position where your current image is>].src = <URL of your new image>;
//Lets say I want to replace the below iphone image to attachment clip icon.
var image =document.images;
alert(image[3].src);
image[4].src = 'https://demo010.service-now.com/images/icons/attachment.gifx';
Before script:
After script
:
You can use similar logic to change description also. Let me know if you have queries.
How to find the position of your image?
Answer: You can give few alerts to check your image position.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2014 08:00 PM
Hi bhaveshumour, thanks.
I got something similar and am able to change the description now. Thanks for your prompt reply.
var ele_Parent = document.getElementsByClassName('catalog_description')[0]; | |
var div = document.createElement('div'); | |
div.innerHTML = 'something'; | |
ele_Parent.insertBefore(div, ele_Child.nextSibling); | |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2014 08:59 PM
Excellent