setValue is not working HTML variable in catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2024 10:40 PM
I have created a HTML variable in a catalog item. I am setting hyperlinks data to variable through client script based on a dropdown value change. It used to work as expected. When i change a value in dropdown, it shows the hyperlink in that HTML variable as in second screenshot. But suddenly it's stopped working may be from past few days. I am not sure any functionality deprecated wrt HTML variable. Attaching the code as below. Please help me on resolving this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2024 10:58 PM
Hello @Mahesh Kumar2
Instead of using setlink try using below:
var url;
url = <a href = 'add your url' >Title</a>
Use this url in your variable.
Regards,
Vrushali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2024 01:42 AM
Hi Vrushali, Thanks for the response.
setLink is the custom function written by me for just reusability. The issue here is, url variable which i am trying to assign with g_form.setValue() is not working for html field. I still need to use setValue with your approach which is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2024 01:54 AM
Please check on below points and revert with the findings :
1. Ensure that the client script is active and UI type is set to All
2. Put an alert before the if condition to check what you are getting in the new value. I doubt that none of the if conditions are matching as your drop down values might have changed.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2024 03:10 AM
Hi Amit,
I checked the mentioned things already with adding some alerts in between. Conditions are working as expected and value is getting picked. only the setValue part is not working i believe.