Changing text size on different browsers from Javascript

Discussion in 'Javascript' started by Aaron Gray, Nov 11, 2009.

  1. Aaron Gray

    Aaron Gray Guest

    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
     
    Aaron Gray, Nov 11, 2009
    #1
    1. Advertising

  2. On 11 Nov, 13:34, "Aaron Gray" <> wrote:
    > 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


    http://lmgtfy.com/?q=change text size with javascript
     
    Captain Paralytic, Nov 11, 2009
    #2
    1. Advertising

  3. Aaron Gray

    Aaron Gray Guest

    "Captain Paralytic" <> wrote in message
    news:...
    > On 11 Nov, 13:34, "Aaron Gray" <> wrote:
    >> 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

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


    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
     
    Aaron Gray, Nov 11, 2009
    #3
  4. On 11 Nov, 13:53, "Aaron Gray" <> wrote:
    > "Captain Paralytic" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > On 11 Nov, 13:34, "Aaron Gray" <> wrote:
    > >> 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

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

    >
    > 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!
     
    Captain Paralytic, Nov 11, 2009
    #4
  5. Aaron Gray wrote:

    > "Captain Paralytic" wrote:
    >> "Aaron Gray" wrote:
    >>> 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.

    <http://catb.org/~esr/faqs/smart-questions.html>

    > 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
    --
    Use any version of Microsoft Frontpage to create your site.
    (This won't prevent people from viewing your source, but no one
    will want to steal it.)
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
     
    Thomas 'PointedEars' Lahn, Nov 11, 2009
    #5
  6. Aaron Gray

    Gordon Guest

    On Nov 11, 1:34 pm, "Aaron Gray" <> wrote:
    > 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.
     
    Gordon, Nov 11, 2009
    #6
  7. Aaron Gray

    Gordon Guest

    On Nov 11, 3:45 pm, Gordon <> wrote:
    > On Nov 11, 1:34 pm, "Aaron Gray" <> wrote:
    > 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.
     
    Gordon, Nov 11, 2009
    #7
  8. Aaron Gray

    Aaron Gray Guest

    "Thomas 'PointedEars' Lahn" <> wrote in message
    news:...
    > Aaron Gray wrote:
    >
    >> "Captain Paralytic" wrote:
    >>> "Aaron Gray" wrote:
    >>>> 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.
    >
    > <http://catb.org/~esr/faqs/smart-questions.html>
    >
    >> 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
     
    Aaron Gray, Nov 11, 2009
    #8
  9. Aaron Gray wrote:

    > "Thomas 'PointedEars' Lahn" wrote:
    >> Aaron Gray wrote:
    >>> I dont want to iterate throught the document or anything like that.

    >> RTFM.

    >
    > Which manual, please ?


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


    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
     
    Thomas 'PointedEars' Lahn, Nov 11, 2009
    #9
  10. Gordon wrote:

    > 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
    --
    Anyone who slaps a 'this page is best viewed with Browser X' label on
    a Web page appears to be yearning for the bad old days, before the Web,
    when you had very little chance of reading a document written on another
    computer, another word processor, or another network. -- Tim Berners-Lee
     
    Thomas 'PointedEars' Lahn, Nov 11, 2009
    #10
  11. Aaron Gray

    SAM Guest

    Le 11/11/09 5:12 PM, Aaron Gray a écrit :
    > "Thomas 'PointedEars' Lahn" <> wrote in message
    > news:...
    >>> [...]
    >>> 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 ?

    --
    sm
     
    SAM, Nov 11, 2009
    #11
  12. Aaron Gray

    Aaron Gray Guest

    "SAM" <> wrote in message
    news:4afb0fc4$0$962$...
    > Le 11/11/09 5:12 PM, Aaron Gray a écrit :
    >> "Thomas 'PointedEars' Lahn" <> wrote in message
    >> news:...
    >>>> [...]
    >>>> 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
     
    Aaron Gray, Nov 11, 2009
    #12
  13. Aaron Gray

    SAM Guest

    Le 11/11/09 9:12 PM, Aaron Gray a écrit :
    > "SAM" <> wrote in message
    > news:4afb0fc4$0$962$...
    >>
    >> 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,


    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.

    --
    sm
     
    SAM, Nov 11, 2009
    #13
  14. In comp.lang.javascript message <>,
    Wed, 11 Nov 2009 13:34:32, Aaron Gray <> posted:

    >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.

    --
    (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk IE7 FF3 Op9 Sf3
    news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
    <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
     
    Dr J R Stockton, Nov 12, 2009
    #14
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andries
    Replies:
    5
    Views:
    4,487
    Sean Jorden
    Sep 9, 2003
  2. Doug Mazzacua

    Different Views in Different Browsers

    Doug Mazzacua, Dec 8, 2005, in forum: HTML
    Replies:
    7
    Views:
    464
    Mark Parnell
    Dec 14, 2005
  3. Jud McCranie

    changing text size in browsers

    Jud McCranie, Jun 4, 2006, in forum: HTML
    Replies:
    18
    Views:
    592
    Jud McCranie
    Jun 13, 2006
  4. AAaron123
    Replies:
    1
    Views:
    762
    AAaron123
    Sep 13, 2009
  5. pradeep
    Replies:
    3
    Views:
    143
    Dr J R Stockton
    Jun 7, 2007
Loading...

Share This Page