Hello dear SPIP community,
I am working on a project where I am using a form, which renders a chart and dynamically updates itself on submission via ajax.
Every time the user submits the form, the page jumps back to the beginning of the form (it is quite a long one).
Is there a way to prevent this scrollTop on ajaxReload?
I am embedding the form like this:
<div class="ajax">
<formulaire_custom|>
</div>
- Is there a way to disable the scroll-to the top of the form?
- Is there a way to provide a custom id/class to scroll to, such that it can be customized?
- Is there a way to programmatically enable/disable/alter the ID of the anchor element?
I am asking the last question, because it would be great to disable the scroll-to feature only on certain values changing. I have the code to analyze this, but I don’t understand how to enable/disable this functionality programmatically.
PS: I have also studied this, but I have not been able to answer my question with it:
I also wanted to take the opportunity to thank you for the great work on SPIP, it has been an excellent companion in various projects large and small.
Kind regards