Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 21st, 2005, 12:57 AM
lharby
Guest
 
Posts: n/a
Default change font size in stylesheet class

Basic question, is this possible?

I have managed to crib a javascript function that allows the user to
increase or decrease the font size of a page. (see
http://www.northamptontoday.co.uk/Vi...ticleID=867063
for example. A+ A- in top right).

A div id is used to apply the function to text within that id.

My problem: I am working with a large intranet, all of the page
content is written in tables, therefore if I could have a function
which controlled the TH class, I could apply this to all the pages.

I'm no good with code, so you might have to spell it out, if you are
feeling benevolent?


Any help much appreciated
Ta
Luke
  #2  
Old July 21st, 2005, 12:57 AM
Andrew Thompson
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

On 8 Oct 2004 02:40:24 -0700, lharby wrote:
[color=blue]
> Basic question, is this possible?
>
> I have managed to crib a javascript function that allows the user to
> increase or decrease the font size of a page.[/color]

Browsers already give the user the ability to
increase or decrease the font size.
[color=blue]
>..(see
> http://www.northamptontoday.co.uk/Vi...ticleID=867063
> for example. A+ A- in top right).[/color]

That breaks in Mozilla.

Error: document.all has no properties
Source File: http://...FontSizeFoot.js ...
[color=blue]
> A div id is used to apply the function to text within that id.[/color]

If the user needs the font bigger, why not make it bigger for
the entire page? Is the rest of the text simply unnecessary crap?
[color=blue]
> My problem: I am working with a large intranet,[/color]

A Win/IE intranet?
[color=blue]
>..all of the page
> content is written in tables, therefore if I could have a function
> which controlled the TH class, I could apply this to all the pages.[/color]

You could apply
body {
font-size: 100%;
}

Then link to instructions on how to zoom text in IE.
Alt V | X | G, - Alt V | X | A (largest and smallest).

It becomes a little more complicated if you have a mix
of browsers, but present instructions relevant to the user's
UA and everybody will be happy, getting the text size they
need at that moment on all pages, inbuilt.

[ Note: Follow-Ups set to c.i.w.a.stylesheets ]

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
  #3  
Old July 21st, 2005, 12:58 AM
brucie
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

In comp.infosystems.www.authoring.stylesheets,comp.lang.javascript
lharby said:
[color=blue]
> I have managed to crib a javascript function that allows the user to
> increase or decrease the font size of a page.[/color]

if you didn't fuck around with the font size in the first place it
wouldn't be necessary to employ a dumb mindless newbie gimmick so the
visitor can change their font back to their preferred size. you're an
idiot.


--
l i t t l e v o i c e s
  #4  
Old July 21st, 2005, 12:58 AM
Mark Tranchant
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

brucie wrote:[color=blue]
> In comp.infosystems.www.authoring.stylesheets,comp.lang.javascript
> lharby said:
>
>[color=green]
>>I have managed to crib a javascript function that allows the user to
>>increase or decrease the font size of a page.[/color]
>
>
> if you didn't f*** around with the font size in the first place it
> wouldn't be necessary to employ a dumb mindless newbie gimmick so the
> visitor can change their font back to their preferred size. you're an
> idiot.[/color]

Luke - welcome to ciwas. Brucie does have a point, although I'd imagine
(and hope) that you didn't write the original content.

Leave it to the browser to resize fonts, if the original author was
inconsiderate enough to specify an inappropriate size.

--
Mark.
http://tranchant.plus.com/
  #5  
Old July 21st, 2005, 12:58 AM
Stan Brown
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

"lharby" <lharby@gmail.com> wrote in
comp.infosystems.www.authoring.stylesheets:[color=blue]
>I have managed to crib a javascript function that allows the user to
>increase or decrease the font size of a page.[/color]

Why? Any decent browser can do this -- even a bad browser like MSIE
can do it to an extent.

Why do you feel compelled to reinvent the wheel, and make people
learn your interface instead of using the one in their browser?

That's a serious question.


(P.S. Javascript is the wrong way to do it in any event, since many
users will see nothing happen at all.)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
  #6  
Old July 21st, 2005, 12:58 AM
lharby
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

> Why do you feel compelled to reinvent the wheel, and make people[color=blue]
> learn your interface instead of using the one in their browser?[/color]

I hate to disillusion people: the browser used in our company is IE,
and *none* of our staff will realise that they can affect the font
size through the browser, I can assure you. (Maybe one or two at
most).

People seem to think that once they have reached some level of
competence, skill and expertise that everyone will suddenly be up to
their level. (I too am guilty of this). But most of our users are very
IT illiterate.

Thanks anyway.
  #7  
Old July 21st, 2005, 12:58 AM
Mark Tranchant
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

lharby wrote:
[color=blue]
> I hate to disillusion people: the browser used in our company is IE,
> and *none* of our staff will realise that they can affect the font
> size through the browser, I can assure you. (Maybe one or two at
> most).
>
> People seem to think that once they have reached some level of
> competence, skill and expertise that everyone will suddenly be up to
> their level. (I too am guilty of this). But most of our users are very
> IT illiterate.[/color]

If they want a bigger font, they will complain. Then you can show them
how to fix it, and they might remember.

--
Mark.
http://tranchant.plus.com/
  #8  
Old July 21st, 2005, 12:58 AM
Richard Cornford
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

lharby wrote:[color=blue][color=green]
>> Why do you feel compelled to reinvent the wheel, and make people
>> learn your interface instead of using the one in their browser?[/color]
>
> I hate to disillusion people: the browser used in our company is
> IE, and *none* of our staff will realise that they can affect the
> font size through the browser, I can assure you. (Maybe one or
> two at most).
>
> People seem to think that once they have reached some level of
> competence, skill and expertise that everyone will suddenly be
> up to their level. (I too am guilty of this). But most of our
> users are very IT illiterate.[/color]

If you problem is internal to one company sending everyone a general
e-mail telling them how to change the font size in IE would leave them
all informed, and for less effort than would be involved implementing
any mechanism to do it for them (which would still need to be documented
in help anyway (indeed a help entry under changing font size that just
described how IE facilitates it would probably satisfy any requirement
alone)).

But you will probably find that the minority who already know how to
change the font size in IE corresponds 100% with the individuals who
need/want to change the font size (the ones with less than perfect
eyesight, etc). The rest don't need the facility, and won't use it even
if you implement it.

Richard.


  #9  
Old July 21st, 2005, 12:59 AM
Philip Ronan
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

On 11/10/04 9:13 am, lharby wrote:
[color=blue]
> I hate to disillusion people: the browser used in our company is IE,
> and *none* of our staff will realise that they can affect the font
> size through the browser, I can assure you. (Maybe one or two at
> most).[/color]

So why don't you just write a page that shows people how to change the
default font size in IE?

Surely that's a better solution than what you seem to be attempting at the
moment?

--
Philip Ronan
phil.ronanzzz@virgin.net
(Please remove the "z"s if replying by email)


  #10  
Old July 21st, 2005, 12:59 AM
Andrew Thompson
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

On 11 Oct 2004 01:13:23 -0700, lharby wrote:
[color=blue][color=green]
>> Why do you feel compelled to reinvent the wheel, and make people
>> learn your interface instead of using the one in their browser?[/color]
>
> I hate to disillusion people: the browser used in our company ...[/color]

[ Did you miss the 'w' in the 1st group's name? ]
[color=blue]
>..is IE,
> and *none* of our staff will realise that they can affect the font
> size through the browser,[/color]

So how will they 'realise' that little 'widget'/'button'
whatever resizes the text?

You will educate them, right? Perhaps have an eye-catcing image
beside it that links to a page that explains what it does?
In that case, have the explanation page give instructions
on resizing text in IE, using the IE menus.

[ It took me about 5 minutes to find the obtuse little buttons
you mentioned, even knowing they were there. 'Alt v | x | r' is
much simpler, if only web-designerd would not keep f*cking it up
with exact pixel sizes. ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
  #11  
Old July 21st, 2005, 12:59 AM
Alan J. Flavell
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

On Mon, 11 Oct 2004, lharby wrote:
[color=blue]
> I hate to disillusion people:[/color]

As my Mum taught me "blessed are they who expect nothing, for they
shall not be disappointed" ;-)
[color=blue]
> the browser used in our company is IE, and *none* of our staff will
> realise that they can affect the font size through the browser, I
> can assure you. (Maybe one or two at most).[/color]

How much more important it is, then, to concentrate effort on
educating those who need it, rather than frittering away effort on a
non-standard mechanism which only works on a small subset of the pages
that they will visit on the (ahem) *World* Wide web.
[color=blue]
> People seem to think that once they have reached some level of
> competence, skill and expertise that everyone will suddenly be up to
> their level. (I too am guilty of this). But most of our users are
> very IT illiterate.[/color]

Absolutely. So the most important tool is the one called
"consistency". Never fob them off with some half-cocked substitute
(that only works under controlled conditions) for the real thing
(which can work anywhere).
[color=blue]
> Thanks anyway.[/color]

Do you know how rude that seems?

all the best
  #12  
Old July 21st, 2005, 12:59 AM
Stephen Poley
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

On 11 Oct 2004 01:13:23 -0700, lharby@gmail.com (lharby) wrote:
[color=blue][color=green]
>> Why do you feel compelled to reinvent the wheel, and make people
>> learn your interface instead of using the one in their browser?[/color]
>
>I hate to disillusion people: the browser used in our company is IE,
>and *none* of our staff will realise that they can affect the font
>size through the browser, I can assure you. (Maybe one or two at
>most).
>
>People seem to think that once they have reached some level of
>competence, skill and expertise that everyone will suddenly be up to
>their level. (I too am guilty of this). But most of our users are very
>IT illiterate.[/color]

Here we go again. When it comes to Word and Excel and PDF files, zooming
the text is considered completely normal. Many, probably a majority, of
the Word/Excel/PDF files I receive are set to something other than 100%.
And only a few of them come from IT people. But if one dares to suggest
that people can do exactly the same in a browser, one gets accused of
being obscure and difficult.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
  #13  
Old July 21st, 2005, 12:59 AM
Stephen Poley
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

On Mon, 11 Oct 2004 10:10:42 +0100, Philip Ronan
<phil.ronanzzz@virgin.net> wrote:
[color=blue]
>On 11/10/04 9:13 am, lharby wrote:
>[color=green]
>> I hate to disillusion people: the browser used in our company is IE,
>> and *none* of our staff will realise that they can affect the font
>> size through the browser, I can assure you. (Maybe one or two at
>> most).[/color]
>
>So why don't you just write a page that shows people how to change the
>default font size in IE?[/color]

Something like http://www.xs4all.nl/~sbpoley/main/adjust.html for
example?

[color=blue]
>
>Surely that's a better solution than what you seem to be attempting at the
>moment?[/color]

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
  #14  
Old July 21st, 2005, 12:59 AM
Toby Inkster
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

Philip Ronan wrote:
[color=blue]
> So why don't you just write a page that shows people how to change the
> default font size in IE?[/color]

Or better still, link to mine:
http://goddamn.co.uk/help/textsize/

My instructions can also be downloaded and adapted for use on your own
site. See:
http://goddamn.co.uk/help/textsize/webmasters

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

  #15  
Old July 21st, 2005, 12:59 AM
Dr John Stockton
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

JRS: In article <MPG.1bd06bc859d21cc898caa6@news.odyssey.net>, dated
Fri, 8 Oct 2004 10:18:42, seen in news:comp.lang.javascript, Stan Brown
<the_stan_brown@fastmail.fm> posted :[color=blue]
>"lharby" <lharby@gmail.com> wrote in
>comp.infosystems.www.authoring.stylesheets:[color=green]
>>I have managed to crib a javascript function that allows the user to
>>increase or decrease the font size of a page.[/color]
>
>Why? Any decent browser can do this -- even a bad browser like MSIE
>can do it to an extent.
>
>Why do you feel compelled to reinvent the wheel, and make people
>learn your interface instead of using the one in their browser?[/color]

<br>
<input type=button value="Font size"
onClick="this.value='Use Ctrl-Mousewheel; or View, Fonts'">
<br>

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<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.
  #16  
Old July 21st, 2005, 12:59 AM
Stan Brown
Guest
 
Posts: n/a
Default Re: change font size in stylesheet class

"Toby Inkster" <usenet200410@tobyinkster.co.uk> wrote in
comp.infosystems.www.authoring.stylesheets:[color=blue]
>Or better still, link to mine:
>http://goddamn.co.uk/help/textsize/[/color]

The auto-detect is interesting. Normally I hate auto-detect, but I
think this one is okay since it says "but it could be wrong" and
provides links to the other possibilities.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles