hpl123 wrote
I have worked around this before but can't remember how. Have you tried having the JS in a JS file and then calling that file instead of calling the JS function directly? (or is that what you are doing).
yes, i load JS from /Custom/JS
hpl123 wrote
Another thing you could try is run some JS from the EXEC_SCRIPT that only set a SessionStorage flag e.g Notify=1 and then have another JS script running with setInterval checking every second or so for that flag and executes some JS if its 1 and then reset it back to 0. I can't remember if ALL JS is "blocked" when running EXEC_SCRIPT but if it isn't, this should work even though its a clunky workaround.
How would Aware know to allow some JS and not others? It has no idea what the JS is doing.
hpl123 wrote
A third thing is of course changing the design of the user interaction i.e where it started from etc. etc. and make sure that is a process i.e don't run it at all via rules.
Can't really do this. The rule is in place. Only other option is to add a process "On Save", and then scatter that extra crud all over an app.
There are several places I want to give this simple notification in the app.
Exactly what I'm doing is this:
On a form a user enters any type of field.
On Save of a form a rule checks for a condition and does something (send email, logs something, whatever).
Instead of a Dialog box which slows the user down and requires a click to close, I just use this code:
function notifyBar(theMsg) {
if(! $('.alert-box').length) {
$('<div class="alert-box alert-box-wide alert-box-left success" >' + theMsg + '</div>').prependTo('body').delay(750).fadeOut(300, function() { $('.alert-box').remove(); });
};
So it shows a msg bar briefly, and then it fades out. Works perfect in my other scenarios.