[Javascript] Font size control bar
Flavio Gomes
flavio at economisa.com.br
Thu Oct 13 07:50:02 CDT 2005
You also copied the styleswitcher.js and all the .css files, right?
Original:
================================================================================
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = *document*.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}
=================================================================================
Then you'll have to change all references from document to parent.document.
PS.: Watch out for popup-blockers.
Hope to Help,
--
Flavio Gomes
flavio at economisa.com.br
Barry Conner wrote:
>I've created the following little view control bar which I designed to display in a frames navigation window for my HTML-based application interface. The frame is generated as a popup to exclude all of the undesirable toolbar & status bar overhead.
>
>The actual font manipulation here is handled via a set of JS & CSS files (as posted at http://www.alistapart.com/articles/relafont )
>
>HERES THE QUESTION: This is intended as a mere view control bar, so how might I script the fontsize controls to act on the main frame rather than on itself???
>
>Thanks for any thoughts you might have on a solution!
>
>Barry
>
><!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
><form name="font_select" action="GET">
> <table align="center" width="100%" location="0" cellspacing="0" cellpadding="4" rules=cols frame=below border="1" margins="0">
> <tr>
> <td width="25%">
> <strong>
> View Control:
> </strong>
> </td>
> <td align="center">
> <button type="button" onclick="javascript:history.back()"><small> Back </small></button>
> </td>
> <td align="center">
> <button type="button" onclick="javascript:history.forward()"><small>Forward</small></button>
> </td>
> <td align="center">
> <button type="button" onclick="javascript:fontsizedown();"
> value=" font - " />
> <small>Smaller Font</small></button>
> </td>
> <td align="center">
> <button type="button" onclick="javascript:fontsizereset()" />
> <small> Reset Font </small></button>
> </td>
> <td align="center">
> <button type="button" onclick="javascript:fontsizeup();"
> value=" font + " />
> <small> Larger Font </small></button>
> </td>
> </tr>
> </table>
> <hr />
></form>
><!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20051013/69856fcb/attachment.htm>
More information about the Javascript
mailing list