client script, variable, focus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2016 02:52 PM
In the Service Portal, how does one get a form element variable, of a catalog item, within a client script so one can set the focus on that input?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2017 11:00 AM
CORRECTION - to fix the issue with the showFieldMsg, be sure to set the scroll form parameter to false
Method Detail | Parameters | Example |
---|---|---|
showFieldMsg(input, message, type, [scrollform]) |
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2017 11:02 AM
Yep, that would do it ~
Cheers !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2018 02:44 PM
To focus on a field in record producer on portal side copy and paste the below code in your onload client script and replace the "011a705e1355d348eb633598d144b023" with the sys_id of that field.
setTimeout("var refocus = document.getElementById('sp_formfield_IO:011a705e1355d348eb633598d144b023');refocus.focus();",0);
Thanks,
Adam Syed