Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 3 Monaten
Letzter Beitrag:
vor 2 Jahren, 3 Monaten
Beteiligte Autoren:
Piet van Zanten, cardcoder

[WB19] AWP: PopUp with calendar control sends page to server

Startbeitrag von Piet van Zanten am 29.10.2015 13:55


I have an awp page with a calendar on a popup page.
When the popup opens and a user selects the next month using the arrow key somehow the page global declarations and initialization code is executed, discarding the current state of all controls.

Why is the page sent to the server? The popup and the calendar control on it only use browser code. I would expect all actions to take place only in the browser, leaving the page in an unaltered state.
There seems to be no setting to make the calendar only work in browser mode.
I even set all unused server code sections in the calendar to Ajax mode, but still the page gets completely refreshed.



Hi Piet,

I tried this and it is a nightmare - the problem is with focus and the popup.

You should be able to use the calendar control on a page as a "normal" control and it should make changes using the "whenever modified" procedures.

The other way is -

Make a giant cell that holds all of your other controls on the page
put the calendar control in a cell (cell at bottom of page and hidden) and then -

change the cell co-ordinates to put it in the centre of the of the page
make the giant cell hidden / inactive etc
make the cell visible
do what you need to do
hide the cell
make the giant cell active again

Perform all other actions

Hope this helps,


von cardcoder - am 29.10.2015 17:45
Hi Mike,

Are you saying that the popup probably does not know about the underlying page?
That would explain this behaviour, because in this case the form is not submitted for preservation.

To clarify:
My guess about AWP is that it has a mechanism to automatically save the values of the controls on a page when a server request is made. That explains the two runs of the initialization code whem loading a page. First run to do a "clean" load, next to restore the controls to their last state.
This is just my guess, unfortunately I was never able to find any useful documentation about how awp really works.

Based on your suggestion, I'll first try to put the edit control hidden on the popup page and see if it keeps its value then.
If this doesn't work I think I'll switch to a Jquery calendar.


von Piet van Zanten - am 30.10.2015 14:00
Hi Piet,

The issue is with the focus. Popups are really strange!!! I had quite alot of problems and that is why I use the solution I displayed above.

Just try it - make 2 cells and put the calendar in the second cell. You will see how easy it is. I had a major issue with 2 html controls on a page. To make them work - and they do VERY WELL - put each one in a cell. I had to do this for multiple pages being called (Paypal and Worldpay).

Hope it helps.

von cardcoder - am 30.10.2015 14:37
Hi Mike,

I tried your solution, but no result.
Finally I was able to solve it by removing an executeprocess on a combo in the initialization of the page.
Instead I put the combo change code directly in the initialization code.

Thanks for your help anyway.


von Piet van Zanten - am 01.11.2015 19:33
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.