view.postscript the connection between backend and frontend JS

Have you ever needed to call a client script after you run some some serverside code.

The answer is view.postScript=”your client side function” this function is available from 8.5.3

The code in view.postScript will be sent back to the browser and executed like onComplete but you can control it from SSJS. Great news or what do you think?

What can I use this for you might ask .

1. Change UI design when the partial refresh has brought up new data

2. If you have a multi window solution use the script to update parent window or close the current

3. Depending of the result do a secondary partial refresh on a case selected panel

If you already used view.postscript, please write a comment about your use case. 

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>