How do I statically insert dynamic data into client-side JS?

  • I have client-side JS that’s built on-the-fly using configuration documents, and that JS needs to use a repeat control’s variable value statically.

  • In the past I’d put the JS on a Form, then use Computed Text to insert the dynamic portion. Or I’d simply have the Computed Text Formula’s list processing to spit out a bunch of JS based on DbLookups and such. Whatever was simplest. When that code got to the browser it had the JS and the dynamic data presented as fixed JS code client side. Changed each page as needed, worked beautifully.

  • How do I duplicate that capability on a XPage using a repeat control’s variable value?

  • Thanks for your suggestions…