PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → detect if popup has been opened already
detect if popup has been opened already
Débuté par Thomas, 19 jan. 2017 11:23 - 3 réponses
Posté le 19 janvier 2017 - 11:23
Hi

Following situation: I have a form the user fills out and before print I want to check if a certain field is empty and remind the user he has to fill it out or can leave it and continue.

I wanted to do this with the YesNo-function, however, this leads to this error
- The current page (if it exists) is a non-AWP dynamic page.

So I've made a popup displaying what I want. Now, however, I need a way to detect if the popup has already been opened once. Wanted to do this with a global variable which acts as a coutner, but it gets overridden when I open the popup (any way to stop calling the Global Declarations of PAGE when opening a popup?).

So I though setting the counter when closing the popup, I can only do this though if I put the code in the (server) code of the button which, again, calls the Global Declaraions method of the page after closing the popup.

I hope I could make clear what I try to do. Any ideas?

Basically I just need a way to detect if my popup has already been opened once.

Greetings Thomas
Membre enregistré
47 messages
Popularité : +2 (2 votes)
Posté le 19 janvier 2017 - 13:17
Try this:

CellDisplayDialog (Function)

Displays a cell in a page with a DDW effect (Dim Disabled Windows). This function is used to easily simulate a dialog box in browser code, by using a cell in a page.
See Communicating with the Web user for more details.

--
Roy van der Lee
Posté le 24 janvier 2017 - 08:21
Thank you for your answer, however, that's no solution as the CellDisplayDialog() is used in browser code and I need server code to verify things before the popup opens (I'm no web developer, though, so if I can use both, that would be great).

The other possibility with pages is no option as well, as it yields the same error message as with the YES/NO dialog.

any other ideas?
Posté le 24 janvier 2017 - 12:46
Hi Thomas,

Thank you for your answer, however, that's no solution as the
CellDisplayDialog() is used in browser code and I need server code to
verify things before the popup opens (I'm no web developer, though, so
if I can use both, that would be great).


Sure it is a solution... that's what ajaxexecute and
ajaxexecuteasynchronous are for...

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com