Use getElementById in catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 08:12 AM
Hello,
I want to retreive the widget data (which is an HTML table in my case) on a client catalog script to store a dynamic table data into a producer result, nearly the same problem was discussed in this post: Widget and Record Producer .
In order to do that, I want to use: document.getElementById("tableId"); in a catalog client script and do other javascript process, the problem is that I think it's not possible to manipulate the DOM in catalog client script (I'm in Helsinki). is there any solution to this problem (use the DOM or other alternative) in the post shown below they are speaking about: $scope.page.field.value = VALUE but I don't how can I use it?
Thanks in advance
- 10,025 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 07:51 PM
I don't know anything about the Service Portal, sorry. But there are 2 other methods you can try:
gel('id')
g_form.getControl('name')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 03:02 PM
"getControl" doesn't work in Service Portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 02:59 PM
I'd suggest building the table using a widget (through angular), this way you can access to the data directly through the model reference.
See my response in the linked topic, hopefully that may give some more insight...
Re: Widget and Record Producer
Also, you can reference elements within the dom through angular. See my response here also..
Re: service portal, widget, client script, link, event triggers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2016 09:29 PM
Hello Hicham,
Do you get any solution for this?
I also trying to get the same,I need to get the sys_id of a variable via catalog client script.
Thanks
Saranya