Position ON the page

wxdqz

New Member
A simple question, I think:

In the BODY of my HTML page I have long text.
Somewhere in the text I want to know how many pixels below the top of the page a certain sentence starts.

Like:
_______________________________
blablablalblablablabla
blablablalblabla
blablablalblablabla...bla
blablablalblablabla

<SCRIPT LANGUAGE="JavaScript">
var heightofsentence=???????;
</SCRIPT>

This is a certain sentence that starts somewhere halfway the page, but the more precise position is stored in a variable.
blablabla
blablablalblabla
blablablalblablablablablablablabla
blablablalblablabla!
_______________________________

I know what to substitute for the bla's, but can you tell me what to substitute for the question marks? Thanks!


P.S. Browsing on the net I found everthing about height and position of BODY or WINDOW, but not this simple thing.
 
Back
Top