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,930 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,222 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.

  #13  
Dec 13th, 2007
Okay, I've implemented your corrections. Here is the text engine (excluding the php ascii string which handles the line breaks) ---

  var letter = 100;
  
  function alterText() {
      underscore = document.getElementById("n" + letter).innerHTML;
      
      if(underscore == "_") {
  	     document.getElementById("n" + letter).innerHTML=" ";
       } 
      else if(letter < 3450) {    
        document.getElementById("n" + letter).style.visibility="visible";
  	    document.getElementById("n" + letter++).style.color=genHex();	   
  	   }
  	  else
  	    return false;
  }


I guess this function is still getting called each 80ms or so, but if it's returning false, it should be okay? Please tell me it's working in IE. Thanks so much for your diligence in helping me out.

Edit: I think that I've got to use an extra number for the string length when using Math.floor(). I've tested it as such; otherwise it doesn't work.
Last edited by tefflox : Dec 13th, 2007 at 2:07 am. Reason: clearing up number overrun confusion
Reply With Quote  
All times are GMT -4. The time now is 5:56 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC