Hello,
I am launching html popup window using window.open and in that html form having and saveandclose and cancel button .
on cancel button click iam checking if rows are added to form or not and showing confirmation message before closing and now i want to use same logic and show confirm msg when we click on window close cross button.
I tried with window.onbeforeunload event but when i keep this event getting confirm message even for saveandclose button as the window is closing.
Is possible to prevent window closing by detecting whether form is closing from which button click ?