Jelly - On change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2011 10:03 PM
Hi,
Any way we can generate an onChange event in a UI Macro?
Specifically :
I want to attach a handler for "requested_for" in the second check out screen. i.e if the user clears out the 'requested_for' field then the UI Macro should load again , and I have a condition that checks whether 'requested_for' is null and give an alert. But not sure how I can load the UI macro again 😞
Also any pointers on how we can write an alert code in Jelly?
Thanks
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2011 12:35 PM
First of all, let me preface this by saying that you seem to be editing an out of box macro, which may look different than the default.
You should be able to track this event just like you would a normal field in HTML. If you add an onchange attribute to the input for requested for, you can call a javascript function that you write yourself inside of <script> tags. Inside of that script you can call alert to give an alert message (or even better, you can make a GlideDialogWindow appear if you look around the wiki or on SNCGuru http://www.servicenowguru.com/system-ui/glidedialogwindow-terms-conditions-acceptance-page/).</script>
You can even refresh the page using javascript, which would reload the UI macro. There is no way that I know of to refresh just a UI Macro, but you can refresh the page, or edit the existing page content using javascript.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2011 01:26 AM
Thank you ! 🙂