Posts: 6
Threads: 3
Joined: Oct 2020
Reputation:
0
Location: UK
Hi, I have a small application that has wo page/forms. Form 1 is a list with a link to show more information. Clicking the link goes to the second page to show the further information. when I close form (hide) it goes back to the original form but it refreshes, which means if I scrolled down the list, rather than returning to the list where I left it, it has now refreshed and is back at the top of the list.
Is there anyway of stopping this?
Thank you
Posts: 164
Threads: 47
Joined: Jan 2020
Reputation:
4
Location: Portugal
I have this problem also and never found a workaround for this. Interested!!
Posts: 2,250
Threads: 193
Joined: Mar 2018
Reputation:
86
Location: Auckland, New Zealand
What kind list is this? Can you please elaborate how your page is designed?
Not refreshing a page that have possibly changed on the server side, IMO, is a drawback and should not be the preferred solution. It's like using the back button. What you see is not necessarily what in fact exists on the server side...
Posts: 6
Threads: 3
Joined: Oct 2020
Reputation:
0
Location: UK
I generate the list like this:
if SQLQuery1.RecordCount > 0 then
Begin
Repeat
VValue:=VValue+'<tr>'+
'<td>'+SQLQuery1.FieldByName('CoilNumber').AsString+'</td>'+
'<td>'+SQLQuery1.FieldByName('Act_Width').AsString+'</td>'+
'<td>'+SQLQuery1.FieldByName('Act_Length').AsString+'</td>'+
'<td>'+SQLQuery1.FieldByName('Act_gauge').AsString+'</td>'+
'<td>'+'<button type="button" class="btn btn-outline-primary" onclick="return getMeetingID('+#39+SQLQuery1.FieldByName('CoilNumber').AsString+#39+','+
')">Open</button>'+SLineBreak+'</td>'+
'</tr>';
SQLQuery1.Next;
Until SQLQuery1.Eof;
The javascript event pushes some paramters into delphi components and then does a button click event cll to action some delphi code.