Results 1 to 10 of 10

Thread: JS] JavaScript/CSS Font Size Changer

  1. #1
    Join Date
    May 2007
    Location
    By the beach
    Posts
    23
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default JS] JavaScript/CSS Font Size Changer

    1) CODE TITLE:
    JavaScript/CSS Font Size Changer (Persistent Between Pages)
    2) AUTHOR NAME/NOTES:
    DB Design (phpscriptindex.com)
    3) DESCRIPTION:
    Script will allow user to visually change font size. Font size will persist thru page change using a cookie.
    4) URL TO CODE:
    Demo: http://phpscriptindex.com/jsfontchanger.html
    Source: http://phpscriptindex.com/jsfontchanger.txt
    or, ATTACHED BELOW (see #3 in guidelines below):

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by phpsales View Post
    JavaScript/CSS Font Size Changer (Persistent Between Pages)
    I really dislike features like this. If authors stopped arsing around with the font size in the first place, the user would have no reason to want to change it. Moreover, if the user is really in a pinch, the browser will offer font resizing facilities, anyway.
    Mike

  3. #3
    Join Date
    May 2007
    Location
    By the beach
    Posts
    23
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by mwinter View Post
    I really dislike features like this. If authors stopped arsing around with the font size in the first place, the user would have no reason to want to change it. Moreover, if the user is really in a pinch, the browser will offer font resizing facilities, anyway.
    I understand your point and thank you for your comments. Most people would agree features such as this one are written to satisfy the customer/user requirements. This feature was shared in the hope that it could be used to extend customer/user website usability. After all it’s always nice to have features/scripts available when the need arises. Thanks again for your comments.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, I agree with Mike, but there might be some cases where this is useful to someone. Perhaps a page where there is a lot of text and they wish to organize it for the most important items, etc.

    It looks like a nicely functioning script and certainly has more potential for proper use than some other scripts we've seen, so I don't tnink it's worth just dismissing.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Sep 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I like it - but what if you extract data from a database and have several posts where you would like the font to change for all of them at the same time? Can that be achieved?

  6. #6
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by bayswater View Post
    I like it - but what if you extract data from a database and have several posts where you would like the font to change for all of them at the same time? Can that be achieved?
    if you use proper coding techniques yes. What I mean by that is if you use one base size that you declare explicitly (usually in the body section of your css) then use percentages for everything else, well then anytime you change the font size, you would keep the same proportions.


    Quote Originally Posted by mwinter
    I really dislike features like this. If authors stopped arsing around with the font size in the first place, the user would have no reason to want to change it. Moreover, if the user is really in a pinch, the browser will offer font resizing facilities, anyway.
    although mike doesnt populate these forums anymore, there definitely is valid use for properly coded font changer script. accessibility wise you need to accomodate everyone, and you shouldn't be limitting the site to someone that has decent / good eyesite; sites should be expandable so if someone with really poor eye sight can adjust the size and not put exude excess energy in reading / interpretting a site.

  7. #7
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Quote Originally Posted by mwinter View Post
    I really dislike features like this. If authors stopped arsing around with the font size in the first place, the user would have no reason to want to change it. Moreover, if the user is really in a pinch, the browser will offer font resizing facilities, anyway.
    Hello MWINTER,
    I don't see any OBJECTIVE value in your reaction to this script. It helps people with poor eye-sight (like myself) a lot. This script is very useful to them. Don't let personal (subjective) judgements (that have nothing to do with coding, where do these judgments come from??) guide you in evaluating the work of others.

    Arie M.

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    No, he's right. Perhaps overly harsh, but right.

    If you do have poor eyesight, you would simply set your browser to a larger text size by default. That's the whole reason it's embedded as a behavior in the browser.

    But if you had this script on the page overriding your default choice, it would make it either hard to see or excessively large-- no point.

    The only real use to such a script is for switching elements, sorta a zooming in look. Or if some users just like playing with font size. Dunno why, though.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #9
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Quote Originally Posted by djr33 View Post
    No, he's right. Perhaps overly harsh, but right.

    If you do have poor eyesight, you would simply set your browser to a larger text size by default. That's the whole reason it's embedded as a behavior in the browser.
    But that's the problem. Certain people have difficulty in distinguishing the buttons on top of the screen. On the other hand, if they see a very big 'A' on the screen, they just click on it to enlarge the font size.

  10. #10
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm interested in this script but don't know how to customize it.
    I would like to change <span id="inner"> into <span class="inner"> because of the W3 recommendation (I have several blocks). But when I do that, it doesn't work anymore. I believe it's due to var fontElementId ? Thanks for your help !

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •