Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Dynamic Text Sizer won't work in IE6 or IE7


  • Please log in to reply
No replies to this topic

#1 Vegeman

Vegeman

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:01:04 PM

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 ];
}
}

BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users