0

I am parsing the site using Jsoup. everything is ok, but there are 2 links on the site (such as "+" and "-" to rate the story)

for example, link for "+":

<a class="votelink" href="/vote/yes/985dbab6-9bfb-11e1-99eb-f23c91df8b43">bla bla bla</a>

js function located at website for this link is:

$(document).ready(function()
{
    $(".votelink").click(function(e)
    {
        $.get(this);
        this.parentNode.parentNode.innerHTML = 'bla bla bla'
        e.preventDefault();
     })
});

so my question is: how can I add actions on my Buttons and using this actions perform a click on the link at website?

Zakharov Roman
  • 739
  • 3
  • 13
  • 31

1 Answers1

0

If your buttons link to urls you can know, just call them.

Otherwise, use a webview, load the page and call some javascript function to click on the buttons :

Android Calling JavaScript functions in WebView

Community
  • 1
  • 1
Snicolas
  • 37,840
  • 15
  • 114
  • 173