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

Question

Question

cf-next-btn onclick has already advanced the active page

asked on June 12, 2019

I am trying to capture the next button click event so that I can manually trigger a stored procedure to save the page to the database before advancing to the next page. However, in my onclick function, the active page has already advanced to the next page. How do I get the page from which the next button was clicked?

0 0

Replies

replied on June 13, 2019

I was able to capture the previous page id using the following:

var e = $('.cf-page.active');    
var prevPageId = document.getElementById(e.attr("id")).previousSibling.id;

So, var "e" gets set to the active page which, after the next button click, has already advanced to the next page.

var prevPageId gets set to the previous sibling of the active page (i.e - previous cf-page). 

This seemed to work for me.

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

Sign in to reply to this post.