Hello here !!!
I have a question... On my beloved new website ( lol ! ), which I spend months on, I have a crazy thing happening.
Sometimes, the text doesn't appear entirely on the page. As if someone decided to strike a black line accross the page.
This happened on every computer where I tested the page...
Could anyone tell me what it can be ?
I'll give you a screen shot of this ( don't pay attention to the design, the site is not finished )
screenshot (http://psychomoa.free.fr/test.gif)
I'll post the code if necessary...
As somebody already encountered this kind of issue ? it never happened to me before... :confused:
thanks for any suggestions !!!
buntine
04-28-2005, 10:37 PM
Looks like a design issue. Yeah, post some code.
Regards.
ray326
04-28-2005, 11:23 PM
Wow, that black on black doesn't do much for me.
Ness_du_Frat
04-29-2005, 02:27 AM
I have to warn you, the code is.... you'll see ;)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Les Enfants de l'Ô - version 3.0 - Mayi</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="css1.css" type="text/css" id="pStyle">
<base target="iframe1">
<script src="index.js"></script>
<script type="text/javascript">
<!--
function P7_writeStyles(op,a){ //v1.5 by PVII
if(op==0||document.getElementById){var tS="<sty"+"le type=\"text/css\">";
tS+=a+"<"+"/sty"+"le>";document.write(tS);document.close();}
}
P7_writeStyles(1,'.closed ul{display:none;}.open ul{display:block;}');
var startcolor= new Array(255,255,255); // start color (red, green, blue)
var endcolor=new Array(0,0,0); // end color (red, green, blue)
<!--
//cookie stuff here
var expiration=new Date();
expiration.setFullYear(expiration.getFullYear() + 1);
expiration=expiration.toGMTString();
var diedate=new Date();
diedate.setFullYear(diedate.getFullYear() - 1);
diedate=diedate.toGMTString();
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset += search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value
if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function cookie() {
if(get_cookie('val')==""){
document.getElementById('pStyle').href='css1.css';
} else {
document.getElementById('pStyle').href='css'+get_cookie('val')+'.css';
}
if(get_cookie('title')==""){
document.title="Les Enfants de l'Ô - version 3.0 - Mayi";
} else {
document.title="Les Enfants de l'Ô - version 3.0 - "+get_cookie('title');
}
<script language="JavaScript" type="text/javascript">
<!--
var sTop;
var ns=(!document.all&&(navigator.vendor=='Netscape'||navigator.vendor=='Netscape6')&&!window.opera)
//window.onerror=function(e){if(ns)return true;}
//window.onerror=function(e){if(ns)alert(e);return true;}
function switchCSS(val){
var title="Mayi";
startcolor=new Array(255,255,255);
document.getElementById('pStyle').href='css'+val+'.css';
document.cookie='val='+val+';expires='+expiration+';path=/';
if (val==1)
{
strt='Mayi';
startcolor= new Array(255,255,255); // start color (red, green, blue)
endcolor=new Array(0,0,0); // end color (red, green, blue)
title='Mayi';
}
if (val==2)
{
strt='Asla';
startcolor= new Array(153,102,255); // start color (red, green, blue)
endcolor=new Array(0,0,0); // end color (red, green, blue)
title='Asla';
}
if (val==3)
{
strt='Okhanan';
startcolor= new Array(255,153,51); // start color (red, green, blue)
endcolor= new Array(0,0,0); // end color (red, green, blue)
title='Okhanan';
}
if (val==4)
{
strt='Isaac';
startcolor= new Array(102,102,255); // start color (red, green, blue)
endcolor=new Array(0,0,0); // end color (red, green, blue)
title='Isaac';
}
if (val==5)
{
strt='Lúka';
startcolor= new Array(153,255,153); // start color (red, green, blue)
endcolor=new Array(0,0,0); // end color (red, green, blue)
title='Lúka';
}
document.cookie="title="+title+"; expires="+expiration+";path=/";
document.cookie="startcolor_red="+startcolor[0]+"; expires="+expiration+";path=/";
document.cookie="startcolor_green="+startcolor[1]+"; expires="+expiration+";path=/";
document.cookie="startcolor_blue="+startcolor[2]+"; expires="+expiration+";path=/";
document.title="Les Enfants de l'Ô - version 3.0 - "+strt;
I don't think it's really necessary to post also the index.js and scroller.js codes, but I'll do it anyway, so that you have really everything...
index.js :
// JavaScript Document
function P7_swapClass(){ //v1.4 by PVII
var i,x,tB,j=0,tA=new Array(),arg=P7_swapClass.arguments;
if(document.getElementsByTagName){for(i=4;i<arg.length;i++){tB=document.getElementsByTagName(arg[i]);
for(x=0;x<tB.length;x++){tA[j]=tB[x];j++;}}for(i=0;i<tA.length;i++){
if(tA[i].className){if(tA[i].id==arg[1]){if(arg[0]==1){
tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}else{tA[i].className=arg[2];}
}else if(arg[0]==1 && arg[1]=='none'){if(tA[i].className==arg[2] || tA[i].className==arg[3]){
tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}
}else if(tA[i].className==arg[2]){tA[i].className=arg[3];}}}}
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
window.status = "Les Enfants de l'Ô- Copyright Vanessa du Frat";
var delay = 2000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var fcontent=new Array();
begintag='<div style="font: normal 12px Arial; padding: 10px; text-align: justify;">'; //set opening tag, such as font declarations
fcontent[0]="<b>Quoi de neuf ?</b><br>Bientôt la publication en ligne du <a href='http://lesangdesmiroirs.free.fr' target='_blank'>Sang des Miroirs</a>";
fcontent[1]="Nouveau design pour les <a href='http://enfantsdelo.free.fr' target='_blank'>Enfants de l'Ô</a>";
fcontent[2]="Bon, j'en ai marre d'écrire des messages de pub, moi ;)";
closetag='</div>';
var fwidth='170px'; //set scroller width
var fheight='80px'; //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);
if (ie4||DOM2)
document.write('<div id="fscroller" 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
Ness_du_Frat
04-29-2005, 02:30 AM
finally, that's edito.htm, the page in the iframe, on which the glitch occurs :
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset += search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value
if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
If I remember correctly that's an IE error(it fails to recive all it's info and go's crazy), the solution is to just scroll down, then back up the page.
This could easily be acomplished using javascript like all your cookies are if you set two acnhors(scroll down then up immediatly so the user doesn't notice), of course the frame would have to be large enough to have the scroll or things won't work...
buntine
04-29-2005, 05:51 AM
This could easily be acomplished using javascript like all your cookies are if you set two acnhors(scroll down then up immediatly so the user doesn't notice), of course the frame would have to be large enough to have the scroll or things won't work...
Sounds like a bit of a workaround hack.
I am interested in seeing the actual problem occur. Is there any way you can upload the files to a server so we can see if we can reproduce the problem on our machines?
Regards.
Ness_du_Frat
04-29-2005, 06:04 AM
oh, it's even simpler...
just go here :
Website (http://psychomoa.free.fr/accueiltestcookie2.php)
Actually, it's occuring only in IE, as you said. i know about the scrolling up and down, but... if there was another way to avoid it, it could be nice :)
buntine
04-29-2005, 06:33 AM
Works fine for me.
scragar
04-29-2005, 06:36 AM
and me strangly enough.
then again it might just be a matter of trying again(no don't just refresh it. clear your cache first).
Ness_du_Frat
04-29-2005, 06:59 AM
yeah, for me it works fine also, but I tried on different computers, and on the first time, it ALWAYS does the glitch...
I mean, it's not sooo important, most of the people will think something is wrong with their graphic card and get crazy, but... lol !!! If you refresh, the page goes back to normal.
I'm just wondering : why is that ???
scragar
04-29-2005, 07:03 AM
I've told you, IE doesn't process things all at once, it considers things as rows(about 8px a time in horrizontal rows), the problem occurs when by the use of css IE puts a bad row in(that's blank, or blank at a particular point), but the row bellow it has the right info. You wind up with part to the text missing. By scrolling down or reloading the page you tell IE to try again, and it should get it's lines right.
Ness_du_Frat
04-29-2005, 03:08 PM
I was mostly wondering if that was because I had javascript errors on the page ? What do you think, scragar ?
scragar
04-30-2005, 06:11 AM
It's the CSS that causes the problems, not javascript.
I remember reading about it in an MSDN blog, stupid people adding bugs to great things...
webdeveloper.com
Copyright WebMediaBrands Inc., All Rights Reserved.