Welcome! Log In Create A New Profile

Advanced

[WB22] Variable height of the looper

Posted by Michael Drechsel 
[WB22] Variable height of the looper
August 26, 2022 07:35PM
Hi,

did anybody find a way to make the heigth of a ajax looper variable to the browser height ?
Out of the box it doesn´t work, but perhaps a javascript hero has an idea ?

TIA

regards Michael
Re: [WB22] Variable height of the looper
September 03, 2022 10:06AM
Hi Michael,

I don't use ajax loopers, but for a standard looper I usually do unlimited number of rows and put the looper inside a cell with style, overflow, vertical scrollbar.

Regards,
Piet
Re: [WB22] Variable height of the looper
September 04, 2022 12:52PM
Hi Piet,

many thx, that was exacly was im looking for.

BTW, why do you not use ajax loopers ?

regards Michael
Re: [WB22] Variable height of the looper
September 04, 2022 01:46PM
Hi Michael,

First because ajax tables and loopers don't work in awp mode like in dynamic, row selection does not work.
Which is inherent to the way awp works, as it runs page init code on submit, which includes ajax calls.
So to simplify: ajax row selection code executes page init code which destroys the tableposition.
A major part of my work is in awp mode, so there I use mainly tables in browser mode and classic loopers.
It's far more easy to use a browser table that can use straight ajax calls than try to keep the ajax table selection after a submit.
Believe me, I tried.
Second, afaik ajax loopers have no visible row selection, so what's the benefit of ajax for the looper?
And for a dynamic site I prefer tables if possible.

Regards,
Piet



Edited 1 time(s). Last edit at 09/04/2022 01:55PM by pietvanz.
Re: [WB22] Variable height of the looper
September 05, 2022 12:05PM
Hi Piet,

interesting. I changed my project from pure "awp" to dynamic just for the loopers.

I have never in mind that the "browser-loopers" have the same functionality like the ajax loopers.

For now my project works with the ajax loopers, but the dynamic mode has some disadvantages.

Ok, I test it with the browser ones. Thanks again.

regards Michael
Re: [WB22] Variable height of the looper
September 07, 2022 10:53AM
Hi Michael,

The disadvantage of a browser looper is of course that you cannot fill it in server code.
So I use a global variable that contains the looper data and fill it in server code.
Then fill the looper in the onload code.
Like:
//server code
sLooperData is string
FOR each qry_X
    sLooperData+=[RC]+qry_X.f1+tab+qry_X.f2+tab+qry_X.f3
END
//onload browser code
FOR EACH STRING sLine OF sLooperData SEPARATED BY RC
   LooperAdd(LPR_X,sLine)
END

Regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: