Script Function Available to BOTH Client side and Server side Code?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2023 05:35 AM
Is it possible to write a JavaScript function, and make that function available to BOTH client-side and server-side code?
(I don't want to copy it and create a duplicate maintenance situation.)
How? Where? Thanks!
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2023 05:39 PM
Hi, @Brad Bowman I just want to call any arbitrary function like
ReturnRandomColor();
AddCommasToCurrencyStirng(anyCurrencyString)
DoWhatever()
And I want to be able to call it directly from both server side code or client side code. No AJAX. No hoops. No duplicate maintenance.