View Full Version : Refreshing a page when user increases text size

Daniel Poindext
12-10-2004, 12:50 AM
A preemtive thanks to anyone who can offer me help, even if to say that there's no way to do this.

What I need to do is very simple, but I have very little experience with Javascript. My extensive Google searches have been useless. Basically, when a visitor to my webpage changes the text-size keywords in their browser, I need the page to refresh. That's it.

The background behind this, if it helps, is that I'm building a page that scales its text by use of the em unit. I'm using a flash replacement technique with headers, and I'd like the headers to scale in relation to the body type. The headers handle this fine, but only if the user manually refreshes the page after increasing the text size in the menu. I'd like the page to detect their change and reload so that the headers scale seamlessly with the body text.

Just to make sure I haven't been unclear about the method of increasing text size, I'm talking about the controls in your browser. In Firebird: View > Increase Text Size; in IEx: View > Text Size > Smallest thru Largest.

Thanks again for the help. I'm sorry if this topic has been addressed recently; believe it or not I did try to find it by myself. :)

12-10-2004, 01:20 AM
Honestly you are going about it the wrong way. You should create the page so that it scales accordingly with the size of the text automatically, without a refresh. If you need guidence in how to go about this, post your code in the HTML/CSS forum. Javascript isn't needed for something of this nature. Furthermore anyone with JS disabled should you find the solution you request, would view a broken site on resize of the text anyhow.


Daniel Poindext
12-10-2004, 04:08 AM

That really might be the answer I need. I'm actually pretty experienced with scalable CSS design; but this is kind of a personal project that's typography-oriented. So I'm trying to figure out if I can break some "best practice" stuff to get a specific result. I may end up back at the more common solutions, though. :) Thanks for the advice.