JavaScript Function Library

T Pappu
Kilo Contributor

Hello all,

I have some standard JavaScript functions that i want to bundle them into a single repository/file instead of using them in the respective client scrips.

Question is, Is there a place/location where i can store all the standard JS functions so i can call them from any of my client/UI policies?

Thanks,

KP 

1 ACCEPTED SOLUTION

Infact, glide ajax serves as purpose to improve performance.

You can use async glide ajax as well.

 

Regards,

Sachin

View solution in original post

8 REPLIES 8

Yes, that is correct. There is definitely more performance required since you're hitting the server but if you want to reuse code as you're saying there isn't another option. You would have to rewrite code that you wanted to use in two different client side locations. GlideAjax calls are commonly used in the system, I wouldn't expect a performance issue out of this. 

Alright, I will put these functions in the Script Include and will use them via GlideAjax calls until

ServiceNow comes up with a better alternative.

Thanks!

KP

 

 

Infact, glide ajax serves as purpose to improve performance.

You can use async glide ajax as well.

 

Regards,

Sachin

If you want to use it on client side then by GlideAjax function you can do it.