BleepingComputer.com: Dynamic Text Sizer won't work in IE6 or IE7

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Dynamic Text Sizer won't work in IE6 or IE7

#1 User is offline   Vegeman 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 1
  • Joined: 19-November 08

Posted 19 November 2008 - 07:28 PM

The script I found on-line is: "Dynamic Text Sizer" hosted by dynamic Drive. There is no way to reach the developer, I've tried !!!

My problem is the script works fine in NS, FF and Safari but will not work in IE6 or IE7. Does anyone have a fix? I should note that the Dynamic Drive page itself works fine in IE6&7, just not on my page. http://www.goldenyearscomputer.com/about2.htm

Thanks.

Head script:

&lt;script type="text/javascript" src="textsizer.js"></script>

Body script:

<a href="java script:ts('body',1)">+ Larger Font</a> | <a
href="java script:ts('body',-1)">+ Smaller Font</a>

External .js file:

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr');

//Specify spectrum of different font sizes:
var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;

function ts( trgt,inc ) {
if (!document.getElementById) return
var d = document,cEl = null,sz = startSz,i,j,cTags;

sz += inc;
if ( sz < 0 ) sz = 0;
if ( sz > 6 ) sz = 6;
startSz = sz;

if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

cEl.style.fontSize = szs[ sz ];

for ( i = 0 ; i < tgs.length ; i++ ) {
cTags = cEl.getElementsByTagName( tgs[ i ] );
for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
}
}

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users