TOPIC:

[Solved] Stop scroll to top on next page 8 months 3 weeks ago #240332

  • uglyeoin's Avatar Topic Author
  • uglyeoin
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 291
  • Karma: 5
  • Thanks: 3
I'm sure you helped me with this before but I can't find the post. It's a shame I can't find my old posts. Alas here we are.

I want to stop the nextpage button shooting to the top of the screen. I want it to stay on the form we're on.

Here's what I tried
crosstec.org/en/forums/3-breezingforms-f...p-to-top.html#234488

crosstec.org/en/forums/3-breezingforms-f....html?start=6#234685

crosstec.org/en/forums/3-breezingforms-f...submit.html?start=36

Here's my code

Initialization Script
function ff_ff_nm_MESSAGE_init(element, condition)
{
     jQuery("html, body").animate({ scrollTop: 
       jQuery('#ff_formdiv9').offset().top }, 1000);
} // ff_ff_nm_MESSAGE_init

Then in ff_nextpage
function ff_nextpage(element, action)
{
    if (ff_currentpage < ff_lastpage) {
        ff_switchpage(ff_currentpage+1);
       /* self.scrollTo(0,0); */
ff_ff_nm_MESSAGE_init;
    }
} // ff_nextpage

I also tried adding in:
jQuery('#ff_form9').click();
alert('hello');

That seems to have no impact either. It feels like nothing is happening. It must be something I'm doing wrong

Please Log in or Create an account to join the conversation.

Last edit: Post by uglyeoin.

Stop scroll to top on next page 8 months 3 weeks ago #240340

  • uglyeoin's Avatar Topic Author
  • uglyeoin
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 291
  • Karma: 5
  • Thanks: 3
I was doing this in the init script of the form and NOT on the init script of the element! Doing this solved my problem. Sweet!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.044 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!