Principiante
Member
By modifying Erel's Dynamic Keys example I made a websocket based webapp showing a gallery of images.
When I update the gallery the browser I would like to scroll the broser at the beginning of the gallery as it remains in the previous position,
for example half gallery. How can I do?
When I update the gallery the browser I would like to scroll the broser at the beginning of the gallery as it remains in the previous position,
for example half gallery. How can I do?
code example used:
Private MainDiv As JQueryElement
private Sub SetPage
Dim sb As StringBuilder, sbRep As StringBuilder
sb.Initialize
' RICERCA podotti
Dim img As String,i As Int
Query="select * from artpro where reparto=" & rep
Dim cur As ResultSet
cur = Main.SQL1.ExecQuery2(Query, Null)
Log("ExecuteMemoryTable: " & Query)
Do While cur.NextRow
i=1+i
img=cur.GetString("IMMAGINE")
sb.Append(fx("<div class=°w3-quarter°>"))
sb.Append(fx("<img id=°img" & i & "° src=°" & img & "° alt=°" & img & "° style=°width:100%°>" ))
sb.Append(fx("<h4>" & cur.GetString("des") & "</h4>"))
Loop
sb.Append(fx(" </div>"))
sb.Append(fx(" </div>"))
MainDiv.SetHtml(sb.ToString)
End Sub
code part html page:
<!-- !PAGE CONTENT! -->
<div class="w3-main w3-content w3-padding" style="max-width:1200px;margin-top:100px">
<div id="maindiv">
<!-- First Photo Grid-->
</div>