Changing text size on different browsers from Javascript

A

Aaron Gray

Hi,

I want to change text sizes in Drupal, the existing modules for this don't
seem to work.

Basically for font-size'es xx-small, x-small, small, medium, large, x-large,
xx-large, is there a javascript variable that will allow me to increase or
decrease these sizes ?

It maybe different on different browsers ?

Many thanks in advance,

Aaron
 
C

Captain Paralytic

I was after a more inteligent reply, that a list of scripts that do not do
what the browser is doing.

What I want is something that changes the browsers "Text Size" in the
browsers menu.

I dont want to iterate throught the document or anything like that.

Aaron

You asked "Basically for font-size'es xx-small, x-small, small,
medium, large, x-large, xx-large, is there a javascript variable that
will allow me to increase or decrease these sizes ? "
You did not ask for "something that changes the browsers "Text Size"
in the browsers menu."
I cannot help it if you asked for the wrong thing!
 
T

Thomas 'PointedEars' Lahn

Aaron said:
Captain Paralytic said:
Aaron Gray said:
Basically for font-size'es xx-small, x-small, small, medium, large,
x-large,
xx-large, is there a javascript variable that will allow me to increase
or
decrease these sizes ?

It maybe different on different browsers ?

Many thanks in advance,
[...]

http://lmgtfy.com/?q=change+text+size+with+javascript

I was after a more inteligent reply, [...]

You will need to ask an intelligent question first.

What I want is something that changes the browsers "Text Size" in the
browsers menu.

"the browsers 'Text Size' in the browsers menu"?
I dont want to iterate throught the document or anything like that.

RTFM.


PointedEars
 
G

Gordon

Hi,

I want to change text sizes in Drupal, the existing modules for this don't
seem to work.

Basically for font-size'es xx-small, x-small, small, medium, large, x-large,
xx-large, is there a javascript variable that will allow me to increase or
decrease these sizes ?

It maybe different on different browsers ?

Many thanks in advance,

Aaron

You're posting in the wrong group. You want a Javascript group, not a
PHP group.

PS, if you're after an 'intelligent reply', you'd do well to use your
own intelligence when selecting where to post.
 
G

Gordon

You're posting in the wrong group. You want a Javascript group, not a
PHP group.

PS, if you're after an 'intelligent reply', you'd do well to use your
own intelligence when selecting where to post.

Actually I'm the one who should be paying attention regarding which
group I'm in, sorry. :)

Still, if you ask a vague question, you have to expect vague
answers.

Only Internet Explorer has the fixed range of text sizes in its view
menu so no, you can't change the menu value because outside of IE it
would be nonsensical to do so. Firefox for example lets you zoom in or
out arbitrarially.
 
A

Aaron Gray

Thomas 'PointedEars' Lahn said:
Aaron said:
Captain Paralytic said:
:
Basically for font-size'es xx-small, x-small, small, medium, large,
x-large,
xx-large, is there a javascript variable that will allow me to increase
or
decrease these sizes ?

It maybe different on different browsers ?

Many thanks in advance,
[...]

http://lmgtfy.com/?q=change+text+size+with+javascript

I was after a more inteligent reply, [...]

You will need to ask an intelligent question first.

What I want is something that changes the browsers "Text Size" in the
browsers menu.

"the browsers 'Text Size' in the browsers menu"?
I dont want to iterate throught the document or anything like that.

RTFM.

Which manual, please ?

Aaron
 
T

Thomas 'PointedEars' Lahn

Aaron said:
Which manual, please ?

That for the respective browser's API. And the other one, that explains how
to quote properly.


PointedEars
 
T

Thomas 'PointedEars' Lahn

Gordon said:
Only Internet Explorer has the fixed range of text sizes in its view
menu so no, you can't change the menu value because outside of IE it
would be nonsensical to do so. Firefox for example lets you zoom in or
out arbitrarially.

Not true. There are other browsers than IE that have a fixed set of sizes,
for example Opera 10.01. And Firefox (3.5.5) places limitations on the font
zoom factor, too (in both directions), although I cannot tell which ones
exactly (I do not know of a UI or property that shows it).


PointedEars
 
S

SAM

Le 11/11/09 5:12 PM, Aaron Gray a écrit :
Thomas 'PointedEars' Lahn said:
[...]
What I want is something that changes the browsers "Text Size" in the
browsers menu.
"the browsers 'Text Size' in the browsers menu"?
I dont want to iterate throught the document or anything like that.
RTFM.

Which manual, please ?

This of the browser ?

If you want to change something in the menu(s) of a browser, I think you
can't (at least by JS).
And how do you expect to change the menus of this pecific browser which
has not the same menus (or not at the same places) on Windows and on Mac ?
Then, what about that other browser which has not same menus than the
first one ?
 
A

Aaron Gray

SAM said:
Le 11/11/09 5:12 PM, Aaron Gray a écrit :
Thomas 'PointedEars' Lahn said:
[...]
What I want is something that changes the browsers "Text Size" in the
browsers menu.
"the browsers 'Text Size' in the browsers menu"?

I dont want to iterate throught the document or anything like that.
RTFM.

Which manual, please ?

This of the browser ?

If you want to change something in the menu(s) of a browser, I think you
can't (at least by JS).
And how do you expect to change the menus of this pecific browser which
has not the same menus (or not at the same places) on Windows and on Mac ?
Then, what about that other browser which has not same menus than the
first one ?

IIRC you can change the zoom level on IE from JS, I presumed you could
change the text size too.

Aaron
 
S

SAM

Le 11/11/09 9:12 PM, Aaron Gray a écrit :
IIRC you can change the zoom level on IE from JS,

Don't know ... never tried.
(it's a stupidity to want to zoom instead of the user)
I presumed you could change the text size too.

but not the browser's menu to do it

By the way, in most browsers the user can fix the minimal size of the
usual fonts, so you can't reduce the text less that(those) size(s)...

On the other hand I do not see how we can increase size of text (must
increase texts in H1, H2 ... Hn, P, probably DIV, all relatively to
their own origines, natural or set by css) in a web page, even using its
own JS buttons.

Maybe a function could "zoom" the page but, in Firefox for instance, the
user can separate zoom on text and on images or group both.

document.body.style.zoom
does nothing in my Firefox, Safari, Opera, iCab, Camino.
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]>,
I want to change text sizes in Drupal, the existing modules for this don't
seem to work.

Basically for font-size'es xx-small, x-small, small, medium, large, x-large,
xx-large, is there a javascript variable that will allow me to increase or
decrease these sizes ?

It maybe different on different browsers ?

Firstly, you will need to learn to ignore those who post articles merely
to inflate their own egos.

A well-written Web page almost never sets absolute text sizes, only ones
relative to the default setting of the browser. Some such do exist.

Look at <URL:http://www.merlyn.demon.co.uk/js-tests.htm>, in particular
(but not only) Body Font Tests. It might show what you need.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top