Scroll offset coordinates

A

apostolos

Hi all,

Let us suppose that I am interested to get all the html code which is around a point (x,y) in my broswer.
Is this possible to be done and if yes, then how?

Thanks in advance everybody

Apo
 
B

brucie

In alt.html apostolos said:
Hi all,
kissy

Let us suppose that I am interested to get all the html code which is
around a point (x,y) in my broswer.

i don't understand the question. what is "html code ..around a point"?

do you mean you want the coords of a point inside the window?

perhaps it would be better for you to describe what you want to achieve
and we can advise on the best way to achieve it.

please adjust your word wrap to around 75chars
 
N

Neal

Hi all,

Let us suppose that I am interested to get all the html code which is
around a point (x,y) in my broswer.
Is this possible to be done and if yes, then how?

Very cryptic question.

My gut instinct is a "no", but I, and likely anyone, can't say without
more info.
 
A

apostolos

In alt.html Neal said:


i get more of a feeling for "no, especially without a good potting
mix"

Ok, i am sorry for the really confusing way of describing what I want.

Let us say that you go into a portal and there are four sections
top-left, top-right, bottom-left and bottom-right. If i know the
coordinates of the bootom-right section. lets say (x,y) can I gat the
text, images and links that are around the point (x,y). Imagine that you
are looking at your browser and you see something that is really
interesting to you (an image). I want to get all the objects (text,
links and images) around this point.

I hope that this time it is better:)

Apo
 
R

rf

apostolos
Ok, i am sorry for the really confusing way of describing what I want.

Let us say that you go into a portal and there are four sections
top-left, top-right, bottom-left and bottom-right. If i know the
coordinates of the bootom-right section. lets say (x,y) can I gat the
text, images and links that are around the point (x,y). Imagine that you
are looking at your browser and you see something that is really
interesting to you (an image). I want to get all the objects (text,
links and images) around this point.

Ah. You want to steal bits of other peoples pages?
 
A

apostolos

apostolos


Ah. You want to steal bits of other peoples pages?

Nope:)

i want to make an agent that learns the user preferences by watching his
eyes. If you focus a long time on the sport section of a portal (even
without clicking any link) it means that you are reading something
there. But I dont know how to connect the coordinates that I get from
the eye tracker with the actual page as it is being displayed by the
browser.
 
B

brucie

In alt.html apostolos said:
Let us say that you go into a portal and there are four sections
top-left, top-right, bottom-left and bottom-right. If i know the
coordinates of the bootom-right section. lets say (x,y) can I gat the
text, images and links that are around the point (x,y).

copy+paste or alt+prt scr
Imagine that you are looking at your browser and you see something
that is really interesting to you (an image). I want to get all the
objects (text, links and images) around this point.

design your own browser that allows you to select an area and extract
the content.

and if you're using a premium organic potting mix ensure you wet the
potting mix before use to help prevent breathing in the little microbes.
 
R

Robert Frost-Bridges

apostolos said:
Hi all,

Let us suppose that I am interested to get all the html code which is
around a point (x,y) in my broswer. Is this possible to be done and if
yes, then how?

Do you mean, highlight the area of the page you are interested in then
right-click>View selection source ?
 
J

Joel Shepherd

rf said:
apostolos

Ah. You want to steal bits of other peoples pages?

Please. I can think of at least two legitimate uses for this kind of
functionality.

One I saw as part of a smart personal spider: you could go to a site
(say, like Amazon, where the product detail pages all have a similar
structure and layout), select a representative sample of text, coax it
into a semantically rich XML structure, and then set the spider loose to
pull down and intelligently index similarly structured pages on the rest
of the site. You wouldn't say that Googlebot steals, so why would this
be any different?

Another is simply dealing with the fact that while more useful and
important information is being placed on the Web, the content providers
are still doing a horrible job of making sure that content doesn't move
or outright disappear. I've seen a number of articles in recent months,
about the difficulty in using web content as a reference (e.g., in a
footnote for a scholarly article) due to this very problem. Just as it's
fair use for a researcher to photocopy pages out of book for later
reference, it seems reasonable -- and frankly more of a necessity -- for
a researcher on the web to be able to snip and save parts of pages to
refer to later. After all, the odds are good that a month or two later,
the original page will be gone.

Oh, and then there's the OP's stated goal, which sounds like perfectly
legal use to me as well.

Have a nice day; it's sound like you need the encouragement.

--
Joel.

http://www.cv6.org/
"May she also say with just pride:
I have done the State some service."
 
K

Kris

apostolos said:
Let us say that you go into a portal and there are four sections
top-left, top-right, bottom-left and bottom-right. If i know the
coordinates of the bootom-right section. lets say (x,y) can I gat the
text, images and links that are around the point (x,y). Imagine that you
are looking at your browser and you see something that is really
interesting to you (an image). I want to get all the objects (text,
links and images) around this point.

Use Mozilla and it's DOM Inspector (under the Tools menu, I believe). It
does not let you select a section on the page but as you go trough the
Object tree of the page, Mozilla highlights the selected object with a
brightly colored border. Once you find the right object, try and
retrieve it's content from there.

Be noted that HTML itself has little to nothing to do with the way it is
rendered in the window. Do not expect that the appearance of a
particular object is contained within that object (more and more often
the appearance of things is separated in a (CSS) style sheet), or that
even all content that appears to be inside that object really is inside
it. Or even worse for you, that there is not even an object (say, a
background picture of a box).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top