Switching styles?

  • Thread starter Thread starter Leigl
  • Start date Start date
L

Leigl

Hi

Using FP 2002 (and ISP has extensions installed) and I want to let my
website visitors change stylesheets (change textsize from normal to larg via
CSS).
I would prefer that the visitor could change the textsize (CSS) from a
drop-down box.
Is that possible in frontPage, how can I do that?

Thanks
/Leigl
 
Are you aware that browsers allow the user to change text
size if they so desire?

In Internet Explorer, View | Text size.
 
You can do it from a dropdown box but it will have to call either a
javascript or server side styleswitcher script. There are several around,
alistapart.com has one and I'm sure many of the script archives do as well.

Search for stylesheet switcher and your scripting language of choice (or
what is supported by your domain host).
 
Yepp, sure am!
But there is also the possibility to do more things with an alternate
CSS-file than just changing size - that was just an example....

/Leigl
 
Well I´ve tried styleswitcher from Alistapart, works fine when I use a
button to change stylesheet but I want to use a drop-down box and I have
not been able to find the right javascript code to make it work.
Any pointers?

/Leigl
 
Assuming you are using the Javascript stylesheet switcher with the following
button code:

<a href="#"
onclick="setActiveStyleSheet('default');
return false;">change style to default</a>

Create a form with a dropdown box. Right click the dropdown box and select
"form field properties". Click the "Add" button. In the dialog box:

Choice = setActiveStyleSheet('default'); [what is in the onlick]
Specify Value = change style to default [text of link as in above]

put in a submit button or use an image for your submit button and you have
changed it to a dropdown box instead of a hyperlink or image link. Same
basic instructions if you are using one of the server side switchers.
 
Back
Top