Results 1 to 3 of 3
  1. #1
    bobocheez is offline Member
    Join Date
    Aug 2010
    Posts
    28
    Rep Power
    0

    Default Getting HTML element with mouse click in browser?

    Hi,
    If you have a simple java browser, is it possible to get an element with a mouse click?

    For example, if I open the java browser and click on the "Home" tab above, it would get <a class="navtab" href="content/">Home</a>.
    By get, I simply mean just set it as a string variable.

    I apologize if it's too vague, I'm still new at this so let me know if I need to expand on it. I usually look up everything, but I don't know what to search for anymore.

    Thanks.

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    786
    Rep Power
    5

    Default Re: Getting HTML element with mouse click in browser?

    Are you sure that you mean java and not javascript?
    Getting HTML element with mouse click in browser?-3779250024_68be4fe8b0.jpg

  3. #3
    bobocheez is offline Member
    Join Date
    Aug 2010
    Posts
    28
    Rep Power
    0

    Default Re: Getting HTML element with mouse click in browser?

    I'm sure. That's the thing, every time I try to look it up it just gives me javascript.

    I know that you can make a simple browser with Java and you can track when the mouse is clicked and what it's position is. But is it possible to get the HTML element? I know it's possible to get it in javascript.

    If it's not possible in java, would it be possible to use them together somehow? Like get the java to go to a webpage with the javascript, load a page and have the javascript track and print out the element. Then just get the source with java and print it out again with java.

    However, I'm really hoping that there is a way to do this with only java.

    Thanks.

Similar Threads

  1. change color on mouse click
    By hannerz06 in forum New To Java
    Replies: 3
    Last Post: 03-31-2010, 09:46 PM
  2. Replies: 1
    Last Post: 10-30-2009, 06:47 AM
  3. mouse click do not work after repaint
    By nobody in forum Java 2D
    Replies: 8
    Last Post: 12-07-2008, 04:43 PM
  4. mouse click alert
    By amir in forum AWT / Swing
    Replies: 1
    Last Post: 08-05-2008, 10:42 PM
  5. Problem in mouse click n repaint
    By Preethi in forum New To Java
    Replies: 4
    Last Post: 07-04-2008, 11:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •