User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 373,479 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,936 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Javascript breaks IE - please help.

Join Date: Jul 2006
Posts: 155
Reputation: tefflox is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
tefflox's Avatar
tefflox tefflox is offline Offline
Junior Poster

Re: Javascript breaks IE - please help.

  #3  
Dec 12th, 2007
Well, friend, let's avert the question of "what works" for something better. First, thank you kindly for helping out. I'm only getting to this now; have not implemented your programming corrections. If you will, can you please slow down over the detail regarding the errors? I just learn enough programming to do what I need it to do, not unlike an "amateur" photographer (which I am :-)

So, before I go about this half-blinded, not really knowing why it works (as you see, I did sweat for what I've got), can you explain a bit slower, precisely why I must take to account the larger context of these corrections? I'm just trying to learn.

Also, is the following code (for the text engine (~/iijima . . .) ok? ---
setTimeout("setInterval('alterText();', 90);", 2500);
I've heard complaints about similar usage, but not as how to fix it.


Originally Posted by hielo View Post
  
  <script type="text/javascript">
  var timer=[];

.
.
.

  var letter = 0;
  
  function alterText() { // lateral to var letter, the changes seem to be stylistic (?)

    document.getElementById("L"+letter).style.visibility="visible";
    document.getElementById("L"+letter).style.fontSize=Math.floor(140 + Math.random() * 100) + "%";  	  	   
    document.getElementById("L"+letter).style.color=genHex();
    letter++; 
     if(letter>23)
	{
	        clearTimeout(timer[0]);
		clearTimeout(timer[1]);
		clearTimeout(timer[2]);
	}  
   }


  </script>
.
.
.
  <script type="text/javascript">
  window.onload=function(){
    		timer[0]=setInterval("alterText();", 110);
    		timer[1]=setInterval("alter();", 100);
	   	timer[3]=setInterval("alter();", 100);         
	}
.
.
.
Reply With Quote  
All times are GMT -4. The time now is 5:37 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC