have you realized that when comes the time the JS runs, the page is in the browser (the client) and not in the “server” (where the IS service resides)?
Review what you want to accomplish, and verify whether your current approach is appropriate to get it.
I would recommed you to revise the ‘web programming model’…
The DSP tags are evaluated (e.g. the service is run) on the server when the client requests the page.
The JS within the page is not executed on the server.
The DSP tags are gone when the client gets the page.
You can invoke IS services from JS on the client but not using the DSP tags. You’d use other techniques for calling IS services from client-side JS.
One approach I’ve used is AJAX techniques to retrieve additional .dsp pages, passing URL parameters to the page which is in turn available to the IS service.