Results 1 to 3 of 3
- 11-30-2011, 04:31 AM #1
Member
- Join Date
- Aug 2010
- Posts
- 28
- Rep Power
- 0
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.
- 11-30-2011, 07:07 AM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
- 11-30-2011, 07:17 AM #3
Member
- Join Date
- Aug 2010
- Posts
- 28
- Rep Power
- 0
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
-
change color on mouse click
By hannerz06 in forum New To JavaReplies: 3Last Post: 03-31-2010, 09:46 PM -
How can i move the mouse over a html element within web browser?
By bobomonkey in forum Advanced JavaReplies: 1Last Post: 10-30-2009, 06:47 AM -
mouse click do not work after repaint
By nobody in forum Java 2DReplies: 8Last Post: 12-07-2008, 04:43 PM -
mouse click alert
By amir in forum AWT / SwingReplies: 1Last Post: 08-05-2008, 10:42 PM -
Problem in mouse click n repaint
By Preethi in forum New To JavaReplies: 4Last Post: 07-04-2008, 11:16 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks