confirm method legacy forms

Folks,

I have a client which recently upgraded to 4.8.1. I have been engaged to correct an error in a PRD I wrote a few years ago. I have spent many hours and have finally narrowed it down to a function within an inline script which makes a call to the javascript window.confirm() method.

In the prior release (I think they were on 4.6) this worked, it popped up the OK / Cancel dialog. Now, what I am seeing is that the first time you go to the PRD it works, but subsequent times it acts as if you just pressed the cancel button with no dialog display.

UPDATE: After fiddling with this a bit, now it consistently does not pop up the confirm() dialog.

Any ideas? Troubleshooting tips?

Thanks,

Rob

  • OK, I seem to be learning something new. Got this in the browser java console:

    A window.confirm() dialog generated by this page was suppressed because this page is not the active tab of the front window. Please make sure your dialogs are triggered by user interactions to avoid this situation. https://www.chromestatus.com/feature/5140698722467840

    This makes it seem like what I'm trying to do can't be done, but it used to work in 4.6, and I'm pretty sure 4.7 as well. Makes me think that somehow there are some subtle changes in the legacy form implementation in 4.8 that we don't know about. Not sure yet. It does seem to offer a vague explanation of why the first time I opened a form I got one behavior and all the subsequent times I got a different behavior, maybe, at least a straw to grasp at.

    Moron this story as it develops...

  • I know it might sound silly, but I dont see the exact PRD and scripts used, so might be worth a shot - have you tried calling the confirm() method not with 'window.' prefix? I might be wrong with the concept of the context of that method, but I think I was using it that way with success in scenario really similar to what you have described.
  • Hi,

    Have you tried using

    form.interceptAction("SubmitAction", order, function)

    in Form/Events/onload ?

    I have working confirmation dialog with that in 4.8.2.1

    Rgds,

    Tami