|
home / faq / faq 7
Frequently Asked Question #7
Question: Can I set the user's font-size to a different value
depending on the browser they're using?
Answer: Yes. This and many other browser-specific settings are made
possible by virtue of the fact that the HM Parameter settings
are interpreted client-side, directly by the browser itself; thus
you can inject any JavaScript logic into the setting of the parameters
to be interpreted by the browser. One common method of doing this
is by way of JavaScript's conditional operator; instructions for
using the conditional operator with HM parameters can be found in
Bulletin 4.
The bulletin referenced above was written specifically for HierMenus 4/5 use;
however, the techniques described apply equally to the new configuration file layout
of HierMenus version 6. For example, where you would have made this assignment in
HierMenus 4/5:
HM_GL_FontSize=(HM_NS4&&HM_Mac)?"12":"10";
You would now include the expression within the configuration file like so:
HM_f_UpdateDefaults({
FontSize:(HM_NS4&&HM_Mac)?"12pt":"10pt"
});
|