S
Stefan Finzel
Hi,
i am a newbie on this newsgroup and no javascript programmer. May be i
missed something obvious. Please forgive me.
Using several tables (raw text and csv content only) on a page i decided
to set tables font-size:smaller.
Additionally there are links to make all/each tables font size
smaller/larger on demand and step by step. Arbitrary tables may get large.
Of cause changing the font size is changing in the web browsers visible
area of the web page. I don't like to urge the user to manually scroll
back to the table.
Now is there a simple way to get the current position (of the link just
clicked), to resize the font and move the browsers view back to/near
this position?
function font_size_change(tbl, dsize) {
// ??? get position or element or whatever using self ???
var size = parseInt(document.body.style.fontSize);
size += parseInt(dsize);
if (size > FONT_MAXSIZE) { size = FONT_MAXSIZE; }
if (size < FONT_MINSIZE) { size = FONT_MINSIZE; }
tbl.style.fontSize = size + 'px';
// ??? move page view back near to original ???
}
TIA
Stefan
i am a newbie on this newsgroup and no javascript programmer. May be i
missed something obvious. Please forgive me.
Using several tables (raw text and csv content only) on a page i decided
to set tables font-size:smaller.
Additionally there are links to make all/each tables font size
smaller/larger on demand and step by step. Arbitrary tables may get large.
Of cause changing the font size is changing in the web browsers visible
area of the web page. I don't like to urge the user to manually scroll
back to the table.
Now is there a simple way to get the current position (of the link just
clicked), to resize the font and move the browsers view back to/near
this position?
function font_size_change(tbl, dsize) {
// ??? get position or element or whatever using self ???
var size = parseInt(document.body.style.fontSize);
size += parseInt(dsize);
if (size > FONT_MAXSIZE) { size = FONT_MAXSIZE; }
if (size < FONT_MINSIZE) { size = FONT_MINSIZE; }
tbl.style.fontSize = size + 'px';
// ??? move page view back near to original ???
}
TIA
Stefan