Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 6 Jahren, 8 Monaten
Letzter Beitrag:
vor 2 Jahren, 2 Monaten
Beteiligte Autoren:
Michael Drechsel, Piet van Zanten, DerekM, Michael Q

Webdev and PagePosition

Startbeitrag von Michael Drechsel am 31.10.2011 17:03


I have a Page which is longer as my screen. Even I refresh a table or a looper with a server procedure (not ajax) the page is redraw and scolls at the beginning.

I played with "pageposition", but its a browser-code. I need a function to save the current position and jump to this position after a server procedure.

how can I do that ??


Look at TablePosition().

However it doesn't work in ajax tables, although it is supposed to. PCS have confirmed this is a bug. Its a disgrace.

Strangely TablePosition() is working when the AWP mode is used. This might be a workaround for you.


von Michael Q - am 31.10.2011 17:22
Hi Michael,

it doesn´t work. A simple "goto control" or "scoll to control" must be a solution, but there is nothing ...

von Michael Drechsel - am 01.11.2011 08:10
Hi Michael,

Haven't tried this, but you could define two global variables:
sControlName is string
nRow is int
Before you execute the server procedure you set the variables to the looper name and its row number. Then put in the onLoad code of the page:
if sControlName"" then 
HTH, regards,

von Piet van Zanten - am 01.11.2011 14:57
Hie Piet,

nice idea. I check it out.

von Michael Drechsel - am 01.11.2011 15:39
Hi Piet,

it works, but unfortunatly it seems that "pageposition" can´t use variables :-(

If I write the "real" Controlname into "pageposition" it works, but with the variable "sControlname" nothing happens ...

It´s a bug or feature ????

But with some workarounds it could be a solution ...

I used Statics wich must be defined as anchor ....

von Michael Drechsel - am 02.11.2011 14:27
Hi Michael,

Perhaps with indirection? {sControlName,indControl}


von Piet van Zanten - am 02.11.2011 15:43
Hi Piet,

in BrowserCode indirection is not allowed.

von Michael Drechsel - am 02.11.2011 16:59
Hi All

This is an old thread - but I have a similar issue now (WebDev 19).

The server code refreshes the page position and it is not obvious that they need to scroll down to get the results.

As in the original post - I need something to simulate PagePosition - or something to scroll the page down.

It doesn't seem like a difficult thing to do, but apparently it is. Does anyone have any further suggestions on how to get a screen to scroll down after a return from a server process (no loopers or tables here).



von DerekM - am 18.04.2016 03:27
Ah! Resolved this (for my purposes)

For information only - my process did not have Ajax enabled - therefor I did not see the Return from Ajax event. This handles the PagePosition (browser) code.

All good :)

von DerekM - am 18.04.2016 04:10
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.