0

In my application I open tasks in popups.

An URL in a popup looks like this: 'https://my.app.com/Task.aspx?id=5'

I would like to prevent that a task with a certain id opens in a new popup when a popup is already open with the same id.

So for example, i have 3 open popups with the following URL's:

When I click an url with link to https://my.app.com/Task.aspx?id=6 a new popup should open. When I click an url with link to https://my.app.com/Task.aspx?id=5 I should get a message that this popup is already open.

Background of request: I would like to prevent dataloss when 2 or more popups with same id are open.

Anybody any idea how to develop this in (probably) javascript? (my application is asp.net)

thx Frederik

  • Why not simply keep track of opened popups? – vanowm Jan 17 '23 at 01:17
  • could do that on load indeed by for example saving the ID in localstorage. But what when popup is closed? How to capture that, knowing that there are several controls on the page that should not trigger the unload after being cllicked on... – Frederik Gysel Jan 17 '23 at 19:37
  • I'm not familiar with asp.net, but in javascript [this](https://stackoverflow.com/questions/3291712/is-it-possible-to-open-a-popup-with-javascript-and-then-detect-when-the-user-clo) might work – vanowm Jan 18 '23 at 00:45

0 Answers0