mercredi 29 juin 2016

Keep scroll position of a DIV after a FORM submit using session var or CSS

I have a DIV in a page that has a vertical scroll. Inside that DIV I have a lot of rows that contain a FORM with a submit button.

<div>
<form>text1 <input type=submit></form><BR />
<form>text2 <input type=submit></form><BR />
<form>text3 <input type=submit></form><BR />
[...]
<form>text99 <input type=submit></form><BR />
</div>

What I want is that after one clicks one of that submit buttons the div should jump to the scroll position it was before. Right now it jumps to position 1 what is very inconvenient. The page is not using JavaScript at all.

Is there a way to do it with CSS or HTML/CSS?

or maybe using session variables(NOT cookies)?

Aucun commentaire:

Enregistrer un commentaire