You are viewing limited content. For full access, please sign in.

Question

Question

Forcing scroll to bottom.

asked on August 8, 2017

Hello all,

So we had a request by a client. The request was to make an approve button at the top of a long form as well as a scroll to button button in javascript. We added these two buttons in a Custom HTML block at the very top.

I was able to do both with the following code. This works on mobile, in preview pane or any other platform where the document would not be opened in an iframe. The code is as follows.

    $("#FastApprove").one('click', function() {
        console.log("Approving!");
        $('.Approve').click();

    });
    $("#GoToBottom").click(function() {
        console.log("Going to bottom!");
        $('html, body').scrollTop($(document).height());
    });

The problem I think is that I am having is I just cannot for the life of me figure out how to target the iframe properly when it is opened as a task. 

Thank you for your help!

0 0

Replies

replied on August 8, 2017

Hi there, I had a similar issue last week!

http://answers.laserfiche.com/questions/124975/Scrolling-Javascript-breaks-on-User-Task-step#125020

That answer to my question should work fine for you too.

 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.