Script Include in Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 06:13 AM
Hello Everyone,
I have gone through few links but I have confusion regarding the best practice to call Script Include in Widget, Could anyone provide the general solution with a simple example?
Thanks
Srinivas
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 08:29 PM
I think we're going to need more information than you've given us.
at what part of the script? at the very beginning of the widget when the server script runs? Do you need the script includes call to gather data to use in the widget?
after the client script runs? return client data to the script to process and return new data?
Do you need user feedback and then a script runs?
Does it need to run syncronously, or asyncronously?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 12:03 AM
Hello @Steven Young ,
Actually I'm new here, I have the working script include and client script that is running on variables but right now my requirement is to use only Widget and not the variables (to develop the same process only using widget). Hence I'm trying to copy the client script and script include to Widget client controller and on server side.
I tried using Client Script using GlideAjax (the logic is basically to set something dynamically in a readonly field based the choice that a user selects from another field). Here everything is working dynamically but except the Date functionality.
So I have doubt at this point , whether I should use client script using GlideAjax or to use the Script Include in the server side directly. Kindly guide me.
Thanks
Srinivas