In some times you have to hide the overlay in stream serve dynamically. For a example if the activity is print you want to skip the overlay and if its mail need to continue with the overlay.But in this case you cannot use normal Skip function as overlays are static content. But there are several ways to do this task and in this post am going tell you to do this via a variable which is used the the overlay properties.
So first you have to go to the overlay properties and assign variable for it.
Assign variable name as mentioned above(you can have any name for the variable and same should use in the script part.) Please make sure to Tick the “supress overlay” check box.
Now we are done in the overlay.
Then move the Body or what ever page that you use the overlay and add a script before page load event and apply below code.
In this example I going to skip the overlay when the activity is prints
$prabodha = “TRUE”;
$prabodha = “FALSE”;
Bingo it should work.