Is it possible to simulate clicking elements in a mashup?

10 views
Skip to first unread message

Jesse Rosenberg

unread,
Jul 1, 2016, 1:37:38 PM7/1/16
to DevTargetProcess
We just recently started using TP.  One of the things that has frustrated our users is that we have to continually click "Show More" when there are more than 25 tasks under a story.  I would like to simulate the clicking of "Show More" as the user scrolls the link into view, so that they can see the next page of records automatically without having to do that manual click operation.  (This would still only load pages as the user wants to look at them so as not to overload the server)

I tried generating a click event on "div.tau-list-more" using dispatchEvent but this doesn't seem to work.  I was using this code to generate the click event (grabbed from stack overflow):

function eventFire(el, etype){
  if (el.fireEvent) {
    el.fireEvent('on' + etype);
  } else {
    var evObj = document.createEvent('Events');
    evObj.initEvent(etype, true, false);
    el.dispatchEvent(evObj);
  }
}

 
Was wondering if you could help me figure this out (quite difficult to debug as the code is minified).  I was able to simulate clicks in a jsfiddle using the above code.

Thanks,

Jesse

Jesse Rosenberg

unread,
Jul 5, 2016, 11:09:32 AM7/5/16
to DevTargetProcess
Nevermind, I figured it out.  I had to send the click event to the anchor tag underneath the tau-list-more div.
Reply all
Reply to author
Forward
0 new messages