[Confirm Unload] Script does not work with Autocomplete
Question
confirmunload
Web icon
Forge component by Caio Santana Magalhães

Hi,

I have used the script from the OutSystems 11 version of this component and used it in OutSystem 10. I run into the problem that this script does not work when there is an autocomplete component on the same page. I have verified in a few ways that the auto complete breaks the script. I suspect that it is because the autocomplete also uses the obeforeunload event. Do you have any way to solve this?

Champion

aart van blitterswijk wrote:

Hi,

I have used the script from the OutSystems 11 version of this component and used it in OutSystem 10. I run into the problem that this script does not work when there is an autocomplete component on the same page. I have verified in a few ways that the auto complete breaks the script. I suspect that it is because the autocomplete also uses the obeforeunload event. Do you have any way to solve this?

Hi,


you try use different action to different component?


Cheers


Hey, Right now I am not using the autocomplete anymore and it works.

Champion

aart van blitterswijk wrote:

Hey, Right now I am not using the autocomplete anymore and it works.

Exactly, you have one action in one component, if you want to use two or more, you need others actions


I am just not very happy with this solution, because there are 6 webblocks in this page. And if anyone adds the autocomplete in one of the webblocks the onbeforeunload event stops working. I also don't understand why the autocomplete is using the onbeforeunload event.

Champion

aart van blitterswijk wrote:

I am just not very happy with this solution, because there are 6 webblocks in this page. And if anyone adds the autocomplete in one of the webblocks the onbeforeunload event stops working. I also don't understand why the autocomplete is using the onbeforeunload event.


Is mandatory the OnBeforeUnload?

The OnBeforeUnload of the autocomplete is allways used. My own OnBeforeUnload the client really wants.

Champion

aart van blitterswijk wrote:

The OnBeforeUnload of the autocomplete is allways used. My own OnBeforeUnload the client really wants.

Hi,


If the really need use the OnBeforeUnload, just put a empty (using just start and end node) action


Thiago Mari wrote:

aart van blitterswijk wrote:

The OnBeforeUnload of the autocomplete is allways used. My own OnBeforeUnload the client really wants.

Hi,


If the really need use the OnBeforeUnload, just put a empty (using just start and end node) action



What do you mean? Put this where? In my own OnBeforeUnload? Beside the action that is allready there or only that empty node?

Champion

aart van blitterswijk wrote:

Thiago Mari wrote:

aart van blitterswijk wrote:

The OnBeforeUnload of the autocomplete is allways used. My own OnBeforeUnload the client really wants.

Hi,


If the really need use the OnBeforeUnload, just put a empty (using just start and end node) action



What do you mean? Put this where? In my own OnBeforeUnload? Beside the action that is allready there or only that empty node?

Just make this test, one you use or current action OnBeforeUnload, and in other component, use an empty action, and see if the error continues


Thiago Mari wrote:

aart van blitterswijk wrote:

Thiago Mari wrote:

aart van blitterswijk wrote:

The OnBeforeUnload of the autocomplete is allways used. My own OnBeforeUnload the client really wants.

Hi,


If the really need use the OnBeforeUnload, just put a empty (using just start and end node) action



What do you mean? Put this where? In my own OnBeforeUnload? Beside the action that is allready there or only that empty node?

Just make this test, one you use or current action OnBeforeUnload, and in other component, use an empty action, and see if the error continues



Use an empty action instead instead of my ow OnBeforeUnload action? And how would I know that it works? Because there is no error. It just does not work cause the autocomplete overwrites my own script somehow.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.