Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13211
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Finding the V offset of an element |
| Date | Wed, 04 Apr 2012 14:49:14 +0200 |
| Organization | albasani.net |
| Lines | 22 |
| Message-ID | <tlgon71ol1nd21v94gcss1osimv21olv7k@4ax.com> (permalink) |
| References | <jlgbcm$eti$1@dont-email.me> <jlgcp0$kss$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.albasani.net ux/2q9EgpHte6XBmhD480ju227pfV0t9PjaKVtZkXfXt+mnhY9O94Ii3pii0+ss1dU31ew2cH0UvOTj47PaIpgkN2M/U9a7P60Y3ZtuxlfoPWkzTQmTkBFDnT74X2r2K |
| NNTP-Posting-Date | Wed, 4 Apr 2012 12:49:17 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="3zTjW6d6SjGQ8/43Eaj2QN2pp++pn6VouA1XvQ3cO0ZhloAvNuvE+aTxlgf6gK+Z69Pkhk1hCUlQv+LGqmV702EPYPUD7Z5CwSvDj6qU270CX8CwIEMCx4SUVJOVSZ93"; mail-complaints-to="abuse@albasani.net" |
| X-Newsreader | Forte Agent 4.2/32.1117 |
| Cancel-Lock | sha1:1IFiMr6inVWDzt/aOCJ6QT5a/D0= |
| Xref | csiph.com comp.lang.javascript:13211 |
Show key headers only | View raw
On Tue, 3 Apr 2012 22:18:28 -0430, Leonardo Azpurua wrote:
> s.indexOf("TableRow") < 0 &&
> s.indexOf("Form") < 0) n += elt.offsetTop;
Just a little remark on the sidelines: IE8 and older cannot do
s.indexOf(...) .
You may want to use something like this instead:
function indexOf(s, a) {
var index = -1;
for (var i = 0; i < a.length; i++) {
if (a[i] === s) {
index = i;
break;
}
}
return index;
}
Hans-Georg
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Finding the V offset of an element "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-04-03 21:54 -0430
Re: Finding the V offset of an element "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-04-03 22:18 -0430
Re: Finding the V offset of an element "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-04-03 22:34 -0430
Re: Finding the V offset of an element Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-04-04 14:49 +0200
Re: Finding the V offset of an element "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-04-04 10:28 -0430
Re: Finding the V offset of an element Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-04-05 09:12 +0200
Re: Finding the V offset of an element Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2012-04-04 20:28 +0200
Re: Finding the V offset of an element Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-04-05 09:13 +0200
Re: Finding the V offset of an element Richard Cornford <Richard@litotes.demon.co.uk> - 2012-04-04 07:05 -0700
Re: Finding the V offset of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-04 22:28 +0200
Re: Finding the V offset of an element Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2012-04-05 00:44 +0200
Re: Finding the V offset of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-05 05:50 +0200
Re: Finding the V offset of an element Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2012-04-05 11:22 +0200
Re: Finding the V offset of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-05 13:21 +0200
Re: Finding the V offset of an element Richard Cornford <Richard@litotes.demon.co.uk> - 2012-04-05 04:35 -0700
Re: Finding the V offset of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-05 14:02 +0200
Re: Finding the V offset of an element Richard Cornford <Richard@litotes.demon.co.uk> - 2012-04-10 09:32 -0700
Re: Finding the V offset of an element John G Harris <john@nospam.demon.co.uk> - 2012-04-05 14:54 +0100
Re: Finding the V offset of an element Gene Wirchenko <genew@ocis.net> - 2012-04-05 08:37 -0700
Re: Finding the V offset of an element Richard Cornford <Richard@litotes.demon.co.uk> - 2012-04-04 04:57 -0700
Re: Finding the V offset of an element Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-04-05 09:16 +0200
Re: Finding the V offset of an element "Richard Cornford" <Richard@litotes.demon.co.uk> - 2012-04-05 09:38 +0100
Re: Finding the V offset of an element Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-04-08 18:27 +0200
Re: Finding the V offset of an element Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> - 2012-04-06 21:52 +0100
Re: Finding the V offset of an element "Leonardo Azpurua" <leonardo@exmvps.org> - 2012-04-07 11:18 -0430
csiph-web