Can we include javascript in a HTML field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 05:51 AM
I need to create a catalog item that returns API response data in an array to show in drop downs.
I have tried using client script/script include but can not use XMLDocument on a script include or get the array variable from the script include back to the catalog client script with the getXML.
So, I set a HTML variable to show like so:
But when putting any script behind the 'Click Me' button, such as:
<script>function myFunction() {console.log("Hello World");}</script>
it disappears from the html source code
Any ideas??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 05:58 AM
Hi,
This would be fairly possible via client script and script include. You can trigger a sync call via getXMLWait,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 08:05 AM
thats the problem i have the getXML and getXMLWAIT return to me an xml file which i then need to stripe out data int arrays, and XMLDocument is not not allowed to be run at catalog client script level