Web Site Design Help, Trouble with multiple browser support |
Web Site Design Help, Trouble with multiple browser support |
Doc Holiday |
Feb 11 2007, 12:09 PM
Post
#1
|
Group: Members Posts: 1 Joined: 11-February 07 Member No.: 1,860 |
My website looks perfect when viewed with Mozilla Firefox, but in internet explorer something gets messed up. I know that the cause of the mess-up is from a javascript i have on the page. Basically it fades several different lines of text in and out. I got the code from the web, and i don't know enough to understand it enough. Here is the script that does it. I do know that the part at the bottom in red is the part that is causing the problem. And its the output part of the script. you can see the problem at http://www.dcsalestraining.com/home.html In IE several things get pushed to the right. If anyone could help me sort out the problem i would appreciate it.
CODE <script type="text/javascript"> /*Fading Testimonial Script*/ var delay = 5000; //set delay between message change (in miliseconds) var maxsteps=90; // number of steps to take to change from start color to endcolor var stepdelay=50; // time in miliseconds of a single step //**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect var startcolor= new Array(238,238,238); // start color (red, green, blue) var endcolor=new Array(0,0,0); // end color (red, green, blue) var fcontent=new Array(); begintag='<div style="font: normal 14px Georgia; padding: 5px;">'; //set opening tag, such as font declarations fcontent[0]=""My name is Ed McNeal Jr... My own personal compliment to you is that your presentation, style, personality, delivery, knowledge, and command of the material impressed me more than other presenters..."</br><p>Ed McNeal<br />Taylor Kia, Toledo OH</p>"; fcontent[1]=""I've been in the car business for 21 years with 18 years in management. Of all the training I've been to over the years..., this is the best."</br><p>Roger Torrence<br />Larry H. Miller Toyota</p>"; fcontent[2]=""...I left inspired even though at first I was cynical to start."</br><p>Jeff Campbell<br />Larry H. Miller Chevrolet</p>"; fcontent[3]=""Great workshop, very high energy, (and) real world skills that I can use to be a better salesman."</br><p>Joe Miera<br />Larry H. Miller Honda</p>"; fcontent[4]=""Doug makes this information easy to understand and puts it into real life situations."</br><p>Chuck Wade<br />General Manager<br />Bud Clary Subaru</p>"; fcontent[5]=""The workshop helped me decide not to quit last month. I already had another job lined up but I stayed and made $1,000 more than the month before."</br><p>Lexie Reder<br />Larry H. Miller Subaru</p>"; fcontent[6]=""(I) liked Doug's energy and knowledge, I found it very helpful."</br><p>Rob Hammers<br />Stockton to Malone Honda</p>"; fcontent[7]=""Incredible information; a lot of enery on the instructors part which kept the training interesting. Lots of knowledge and great enthusiasm."</br><p>Manfred Aguirre<br />Larry H. Miller Honda</p>"; fcontent[8]=""I just made a 7 pound deal using your techniques on closing. First with getting buying commitments by using (The Foundation of Five Buting Commitements)... I also used the (Quick Come-back Close). I told my customer, 'Stop joking with me, I know you want the Camry, do you want to (autograph) with your right of left hand today?' She said, 'Right Hand.' This is great training... I plan on using it everyday!"</br><p>Christian (Uati Sakaria)<br />Larry H. Miller Toyota</p>"; fcontent[9]=""I have been sent to many training seminars with different companies and this is by far the most realistic and logical. I have never taken as much from the others combined as I have from yours."</br><p>Patrick H. Staker<br />Larry H. Miller Chevrolet</p>"; closetag='</div>'; var fwidth='510px'; //set scroller width var fheight='150px'; //set scroller height var fadelinks=1; //should links inside scroller content also fade like text? 0 for no, 1 for yes. ///No need to edit below this line///////////////// var ie4=document.all&&!document.getElementById; var DOM2=document.getElementById; var faderdelay=0; var index=0; /*Rafael Raposo edited function*/ //function to change content function changecontent(){ if (index>=fcontent.length) index=0 if (DOM2){ document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")" document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag if (fadelinks) linkcolorchange(1); colorfade(1, 15); } else if (ie4) document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag; index++ } // colorfade() partially by Marcio Galli for Netscape Communications. //////////// // Modified by Dynamicdrive.com function linkcolorchange(step){ var obj=document.getElementById("fscroller").getElementsByTagName("A"); if (obj.length>0){ for (i=0;i<obj.length;i++) obj[i].style.color=getstepcolor(step); } } /*Rafael Raposo edited function*/ var fadecounter; function colorfade(step) { if(step<=maxsteps) { document.getElementById("fscroller").style.color=getstepcolor(step); if (fadelinks) linkcolorchange(step); step++; fadecounter=setTimeout("colorfade("+step+")",stepdelay); }else{ clearTimeout(fadecounter); document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")"; setTimeout("changecontent()", delay); } } /*Rafael Raposo's new function*/ function getstepcolor(step) { var diff var newcolor=new Array(3); for(var i=0;i<3;i++) { diff = (startcolor[i]-endcolor[i]); if(diff > 0) { newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step); } else { newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step); } } return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")"); } if (ie4||DOM2) document.write('<div id="fscroller" style="background-color:#eeeeee;width:'+fwidth+';height:'+fheight+'"></div>'); if (window.addEventListener) window.addEventListener("load", changecontent, false) else if (window.attachEvent) window.attachEvent("onload", changecontent) else if (document.getElementById) window.onload=changecontent </script> Edited by John P. to put in CODEBOX. |
youngcomlover101 |
Feb 19 2007, 10:42 AM
Post
#2
|
Novice Group: Members Posts: 25 Joined: 4-February 07 Member No.: 1,780 |
My website looks perfect when viewed with Mozilla Firefox, but in internet explorer something gets messed up. I know that the cause of the mess-up is from a javascript i have on the page. Basically it fades several different lines of text in and out. I got the code from the web, and i don't know enough to understand it enough. Here is the script that does it. I do know that the part at the bottom in red is the part that is causing the problem. And its the output part of the script. you can see the problem at http://www.dcsalestraining.com/home.html In IE several things get pushed to the right. If anyone could help me sort out the problem i would appreciate it. I use IE and nothing's on the right.Is it a specific version of IE? Also,I got a fade!Wicked! This post has been edited by youngcomlover101: Feb 19 2007, 10:43 AM |
Darin McGrew |
Feb 19 2007, 12:38 PM
Post
#3
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
I recommend starting by fixing the HTML errors reported by the online validator.
|
Lo-Fi Version | Time is now: 27th April 2024 - 06:36 AM |