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 375,232 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 2,043 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: Dec 2007
Posts: 75
Reputation: hielo is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 10
hielo hielo is offline Offline
Junior Poster in Training

Re: Javascript breaks IE - please help.

  #5  
Dec 12th, 2007
Here is your updated ORIGINAL code, if you are interested in the infinite color-changing effect:
<!DOCTYPE html 
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="description" content="listenlight poetry journal" />
  <meta name="keywords" content="poetry" />

      <title>listenlight poetry journal</title>
  <style type="text/css">
    body {
		  background-image: url('/13/default.png');
      background-repeat: repeat;		font-size: x-large;
		  font-weight: bold;font-family: Tahoma, Geneva, Sans-Serif;
		  letter-spacing: 3px;
		  line-height: 1.2;  
     }
     
    #banner {
      position: absolute; bottom: 55%; left: 1%; right: 1%;
      text-align: center;
      font-family: Tahoma, Geneva, Sans-Serif; 
      letter-spacing: 10px;   
    }
  a.firefox:link      {color: skyblue; text-decoration: none; outline: none; cursor: default;}
  a.firefox:visited   {color: skyblue; text-decoration: none; outline: none; cursor: default;}
  a.firefox:active    {color: skyblue; text-decoration: none; outline: none; cursor: default;}
  a.firefox:hover     {color: darkblue; background-color: skyblue; text-decoration: none; outline: none; cursor: default;}
  
  a.archives:link     {
	  color: pink; text-decoration: none; outline: none; opacity: 0.3;
	  font-size: 80%; font-weight: bold; font-family: Tahoma, Geneva, sans-serif;
	 }
	   
	a.archives:visited  {
	  color: pink; text-decoration: none; outline: none; opacity: 0.3;
	  font-size: 80%; font-weight: bold; font-family:  Tahoma, Geneva, sans-serif;
	 }
	   
	a.archives:active   {
	   color: pink; text-decoration: none; outline: none; opacity: 0.3;
	   font-size: 80%; font-weight: bold; font-family:  Tahoma, Geneva, sans-serif;
	  }
	   
	a.archives:hover    {
	  color: black; text-decoration: none; outline: none; opacity: 0.3; font-variant: small-caps;
    font-size: 70%; letter-spacing: 15px; background-color: pink; font-weight: bold; font-family: Tahoma, Geneva, sans-serif;
   } 
   
    </style>     
  
  <script type="text/javascript">
  	colors = new Array(14)
  	colors[0]="0"
  	colors[1]="1"
  	colors[2]="2"
  	colors[3]="3"
  	colors[4]="4"
  	colors[5]="5"
  	colors[5]="6"
  	colors[6]="7"
  	colors[7]="8"
  	colors[8]="9"
  	colors[9]="a"
  	colors[10]="b"
  	colors[11]="c"
  	colors[12]="d"
  	colors[13]="e"
  	colors[14]="f"

  function genTextHex(){
  
  	colorStart="#"
  	for (j = 0; j == 0; j++){
      color = colors[6 + Math.floor(Math.random() * 7)] 
            + colors[6 + Math.floor(Math.random() * 7)]
            + colors[6 + Math.floor(Math.random() * 7)]
            + "";
  	}
  	return colorStart + color;
  }

  function genHex() {

  	colorStart="#"
  	var r = colors[6 + Math.floor(Math.random() * 8)] 
  	var g = colors[6 + Math.floor(Math.random() * 8)] 
  	var b = colors[6 + Math.floor(Math.random() * 8)] 

  	return colorStart + r + g + b + "";
  }


  function alter() {
   	i = Math.floor(Math.random() * 24);
  	document.getElementById(i).style.color=genHex();	
   }

  var letter = 0;
  
  function alterText() {
    document.getElementById(letter).style.visibility="visible";
    document.getElementById(letter).style.fontSize=Math.floor(140 + Math.random() * 100) + "%";  	  	   
    document.getElementById(letter).style.color=genHex();
    letter=++letter%24; 	  
   }


  </script>


</head>
<body>

<div id="banner">
  <a style="text-decoration:none; outline: none" href="/13/iijima">

<span id="0" style="position:relative; visibility: hidden; font-size: normal; top:9px; color:black">l</span><span id="1" style="position:relative; visibility: hidden; font-size: normal; top:14px; color:black">i</span><span id="2" style="position:relative; visibility: hidden; font-size: normal; top:-17px; color:black">s</span><span id="3" style="position:relative; visibility: hidden; font-size: normal; top:11px; color:black">t</span><span id="4" style="position:relative; visibility: hidden; font-size: normal; top:17px; color:black">e</span><span id="5" style="position:relative; visibility: hidden; font-size: normal; top:3px; color:black">n</span><span id="6" style="position:relative; visibility: hidden; font-size: normal; top:9px; color:black">l</span><span id="7" style="position:relative; visibility: hidden; font-size: normal; top:-3px; color:black">i</span><span id="8" style="position:relative; visibility: hidden; font-size: normal; top:2px; color:black">g</span><span id="9" style="position:relative; visibility: hidden; font-size: normal; top:-2px; color:black">h</span><span id="10" style="position:relative; visibility: hidden; font-size: normal; top:-18px; color:black">t</span><span id="11" style="position:relative; visibility: hidden; font-size: normal; top:-17px; color:black">p</span><span id="12" style="position:relative; visibility: hidden; font-size: normal; top:-4px; color:black">o</span><span id="13" style="position:relative; visibility: hidden; font-size: normal; top:3px; color:black">e</span><span id="14" style="position:relative; visibility: hidden; font-size: normal; top:6px; color:black">t</span><span id="15" style="position:relative; visibility: hidden; font-size: normal; top:2px; color:black">r</span><span id="16" style="position:relative; visibility: hidden; font-size: normal; top:-12px; color:black">y</span><span id="17" style="position:relative; visibility: hidden; font-size: normal; top:-6px; color:black">j</span><span id="18" style="position:relative; visibility: hidden; font-size: normal; top:-4px; color:black">o</span><span id="19" style="position:relative; visibility: hidden; font-size: normal; top:-5px; color:black">u</span><span id="20" style="position:relative; visibility: hidden; font-size: normal; top:-5px; color:black">r</span><span id="21" style="position:relative; visibility: hidden; font-size: normal; top:7px; color:black">n</span><span id="22" style="position:relative; visibility: hidden; font-size: normal; top:8px; color:black">a</span><span id="23" style="position:relative; visibility: hidden; font-size: normal; top:-4px; color:black">l</span>  </a>
  </div>
  
<div style="position:absolute; bottom: 15%; left: 10%; right: 10%; text-align:left; color: darkkhaki; font-size: small; letter-spacing: 2px; border: 1px solid cornflowerblue; padding: 1.5em;">
  <br/>Issue 13 for December 2007
  <br/>Editors Jesse Crockett and Guillermo Parra
  <br/>Address query or submitted work to jesse -at listenlight.net
  <br/>  
  <br/>Archive Issues <big><a class="archives" href="/12">&nbsp;12</a> &bull; <a class="archives"  href="/11">&nbsp;11</a> &bull; <a class="archives"  href="/10">&nbsp;10</a> &bull; <a class="archives"  href="/09">&nbsp;09</a> &bull; <a class="archives"  href="/08">&nbsp;08</a> &bull; <a class="archives"  href="/07">&nbsp;07</a> &bull; <a class="archives"  href="/06">&nbsp;06</a> &bull; <a class="archives"  href="/05">&nbsp;05</a> &bull; <a class="archives"  href="/04">&nbsp;04</a> &bull; <a class="archives"  href="/03">&nbsp;03</a> &bull; <a class="archives"  href="/02">&nbsp;02</a> &bull; <a class="archives"  href="/01">&nbsp;01</a> &bull; <a class="archives"  href="/00">&nbsp;00</a></big>
  </div>

<div style="position:absolute; top: 88%; left: 12%; right: 12%; opacity: 0.5; line-height: 1.3em; text-align: left; color: darkkhaki; font-size: x-small; font-variant: bold; letter-spacing: 2px; border: 1px solid darkkhaki; padding: 1.2em; font-family: Tahoma, Geneva, Sans-Serif;">
       Listenlight 13 has not been optimized for the Internet Explorer web browser.
  <br/>To obtain a Web Standards Compliant browser, please visit <big><a class="firefox" style="opacity: 0.7; border-bottom: 2px solid cornflowerblue;" href="http://www.mozilla.org">&nbsp;www.mozilla.org&nbsp;</a></big>
  </div>

  <script type="text/javascript">
    setInterval("alterText();", 110);
    setInterval("alter();", 100);
    setInterval("alter();", 100);         
    </script>

  	<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
  			</script>
  			
  		<script type="text/javascript">
  			_uacct = "UA-493923-1";
  			urchinTracker();
  			</script>
</body>
</html>
Reply With Quote  
All times are GMT -4. The time now is 4:14 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC