Mason A. Clark wrote:
I came upon this trick: a usemap with two buttons for
changing the page's font size:
============
<map name="fontmap" id="fontmap">
<area shape="rect" coords="111,1,126,15"
href="http://niemanwatchdog.org/index.cfm?fontsize=up">
<area shape="rect" coords="127,0,143,14"
href="http://niemanwatchdog.org/index.cfm?fontsize=down">
</map>
============
The page itself is: http://niemanwatchdog.org/index.cfm
Two questions: (1) how does it work? New pages?
What's the question mark ( "cfm?font..." ) do?
and (2) is this idea useful?
(snip) This page button trick may be more convenient.
Mason C
Mason,
It works by sending a modified page from the server. Following the main
style section is a second <style> section that sets font-size to 'small'
or 'x-small' etc. It appears that this value is modified, then the
entire page is resent by the server (based on the time it takes to respond)
A .cfm filetype indicates use of the Cold Fusion development tool.
? is a delimiter between the end of the URL and attached data. When you
click on one of the links, the entire string is sent to the server,
which can look separately at the data being passed (the part after the
?) and determine what you want it to do. In this case fontsize=up.
Note that the server is setting an ABSOLUTE value (small, large, etc.)
whereas the user interface is a RELATIVE value (up, down). This implies
that the server knows what font size is currently in use. That is done
by setting a cookie on the user's system (more overhead) to remember the
currently-in-use font size. Each time you change sizes using this
interface, the cookie is fetched to see what that current size is. Of
course this means the function will not work if the user has disabled
cookies.
I would not view this as useful or more convenient than using the
font-size capability of your browser.
Chris Beall