0
<tr id="data_11">
 <td colspan="7" class="row">
  <table class="table-inner">
   <tbody>
    <tr>
     <td class="col-companyname" onclick="getDetails('11', 'ARBN=BN5321177&amp;CompName=A+ACTIVE+PLUMBING&amp;CompStat=DRGD&amp;Type=BUSN&amp;BusIDType=Number&amp;BusID=65057196&amp;=')" style="cursor:pointer;">A ACTIVE PLUMBING</td>
     <td class="col-companytype">Business Name</td>
     <td class="col-acn">&nbsp;</td>
     <td class="col-abn">&nbsp;</td>
     <td class="col-arbn">BN5321177</td>
     <td class="col-state">&nbsp;</td>
     <td class="col-docimage">&nbsp;</td>
    </tr>
    <tr id="row_11" style="display:none;">
     <td colspan="7">
      <div id="div_11"></div></td>
    </tr>
   </tbody>
  </table></td>
</tr>

I need to call the onclick method getDetails with the above given parameters and get the result. I tried doing this with jsoup but i couldnt get it to work.

Thanks in advance

2
  • i think you getdetails function is not getting called due to the parameters you are passing? Commented Jun 29, 2013 at 5:56
  • i think you misunderstood. The function works. I need a way to call the function via java code and extract information from the result Commented Jun 29, 2013 at 6:54

1 Answer 1

1

Simple Answer : You can't call a javascript function from Jsoup. Jsoup is primarily meant for extracting and manipulating html data.

If you are interested in knowing the response to the request made in getDetails, then you can simulate the same request in Jsoup and get the response. But, If its a business logic in javascript without any server interaction which changes the DOM then you can kiss-off your idea.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.