object.addEventListener is not working service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 10:31 PM
hi all,
when i use
var s=g_form.getControl("variable_name");
s.addEventListener('keyup',functionName);
function functionName(){
alert('inside function')
}
it works fine in catalog item Try It. but when i go to service portal its not working.shows an error has s.addEventListener is not a function
thanks in advance
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 10:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 10:59 PM
Yes brent ! can you suggest any other way to implement this 🙂
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 11:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 11:11 PM
let me explain what I'm trying to do.
i have catalog variable which is a single line text box and i need to do calculation whenever users type something .so i created a onchange on that variable in catalog client script. user enters the value and click .then on change function calls ..i know that's how on-change works so i added addEventListener to variable using getControl . this addEventListener is works fine in catalog item (Try it ) but when i try in service portal its not working