I am trying to finish customizing a search engine and it works perfectly except the fact that what is written under the link's title is with black fonts and the background has the same color. So I have to make those fonts white somehow and none of my primitive skills worked this time!
The last part of the code where i believe I have to add or change something: (I think that Result1+=".l{font-size:16px}\n"; might be the problem but then its really not my strong point so..) Pls give me a pointer or two!
Result1+="<TITLE>Rezultate</TITLE>\n";
Result1+="<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>\n";
Result1+="<style>\n";
Result1+="<!--\n";
Result1+="body{font-family:verdana,sans-serif; font-size:10px; background-color: 'black'}\n";
Result1+="table{font-family:verdana,sans-serif;font-size:10px; background-color: 'black'}\n";
Result1+=".t{font-family:verdana,sans-serif; font-size:13px; background-color: 'black'}\n";
Result1+="a:link{color:#FFCC00}\n";
Result1+="a:visited{color:#FF9900}\n";
Result1+="a:active{color:#33FF00}\n";
Result1+=".h{font-size:16px}\n";
Result1+=".l{font-size:16px}\n";
Result1+="//-->\n";
Result1+="</style>\n";
Result1+="</HEAD>\n";
Result1+="<BODY>\n";
if(SearchWord.length>=1){SearchWord=SearchWord.toLowerCase();
while(SearchWord.indexOf("<")>-1 || SearchWord.indexOf(">")>-1 || SearchWord.indexOf('"')>-1){SearchWord=SearchWord.replace("<","<").replace(">",">").replace('"',""");}
this.status="Se cauta, va rugam asteptati...";BeginTime=new Date();
Result1+="<center><table cellpadding='10' class='t' width='75%'><tr><td>";
for(j=0;j<156;j++){k=Page[j].length-1;SamePage=false;LineNr=0;
for(i=0;i<k-2;i++){WordPos=Page[j].toLowerCase().indexOf(SearchWord);
if(WordPos>-1){
FoundWord=Page[j].substr(WordPos,SearchWord.length);
if(!SamePage){NrRes++;
Result3+="<P>";
Result3+=NrRes+". ";
Result3+="<a class='l' href='http://www.webdeveloper.com/forum/archive/index.php/"+Page[j][k-2]+"'>"+Page[j][k-3].replace(FoundWord,FoundWord.bold())+"</a><BR>\n";
Result3+="<I>URL: "+Page[j][k-2]+" </I>";
Result3+="<I>Size: "+Page[j][k-1]+"k </I>";
Result3+="<I>Date: "+Page[j][k]+" </I>";
}SamePage=true;
if(i<k-3){LineNr++;if(LineNr>2){break;}
if(Page[j].length>350){Result3+="<LI>..."+Page[j].substr(WordPos-100,200+FoundWord.length).replace(FoundWord,FoundWord.bold())+"...\n";}
else{Result3+="<LI>"+Page[j].replace(FoundWord,FoundWord.bold())+"\n";}}
ResFound=true;}}}
if(!ResFound){
Result3+="<CENTER><U>Nici un rezultat gasit!</U></CENTER>\n";}
Result3+="<P><CENTER>"
Result3+="<a class='h' href='http://www.webdeveloper.com/forum/archive/index.php/javascript:history.back()'>Inapoi</a>\n";
Result3+="<a class='h' href='http://www.webdeveloper.com/forum/archive/index.php/#'>Sus </a>\n";
Result3+="</CENTER></td></tr></table></center></BODY></HTML>";
Result2="<center><B>"+NrRes+"</B> rezultate gasite";
Result2+=" pentru <B>"+SearchWord+"</B>. Cautarea a durat <B>";
Result2+=(Math.floor((new Date()-BeginTime)/10)/100)+"</B> secunde.</center><P>";
this.status="Done";
this.document.open();
this.document.write(Result1+Result2+Result3);
this.document.close();}
else{this.status="Eroare: Trebuie sa introduceti macar un caracter!";}}
The last part of the code where i believe I have to add or change something: (I think that Result1+=".l{font-size:16px}\n"; might be the problem but then its really not my strong point so..) Pls give me a pointer or two!
Result1+="<TITLE>Rezultate</TITLE>\n";
Result1+="<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>\n";
Result1+="<style>\n";
Result1+="<!--\n";
Result1+="body{font-family:verdana,sans-serif; font-size:10px; background-color: 'black'}\n";
Result1+="table{font-family:verdana,sans-serif;font-size:10px; background-color: 'black'}\n";
Result1+=".t{font-family:verdana,sans-serif; font-size:13px; background-color: 'black'}\n";
Result1+="a:link{color:#FFCC00}\n";
Result1+="a:visited{color:#FF9900}\n";
Result1+="a:active{color:#33FF00}\n";
Result1+=".h{font-size:16px}\n";
Result1+=".l{font-size:16px}\n";
Result1+="//-->\n";
Result1+="</style>\n";
Result1+="</HEAD>\n";
Result1+="<BODY>\n";
if(SearchWord.length>=1){SearchWord=SearchWord.toLowerCase();
while(SearchWord.indexOf("<")>-1 || SearchWord.indexOf(">")>-1 || SearchWord.indexOf('"')>-1){SearchWord=SearchWord.replace("<","<").replace(">",">").replace('"',""");}
this.status="Se cauta, va rugam asteptati...";BeginTime=new Date();
Result1+="<center><table cellpadding='10' class='t' width='75%'><tr><td>";
for(j=0;j<156;j++){k=Page[j].length-1;SamePage=false;LineNr=0;
for(i=0;i<k-2;i++){WordPos=Page[j].toLowerCase().indexOf(SearchWord);
if(WordPos>-1){
FoundWord=Page[j].substr(WordPos,SearchWord.length);
if(!SamePage){NrRes++;
Result3+="<P>";
Result3+=NrRes+". ";
Result3+="<a class='l' href='http://www.webdeveloper.com/forum/archive/index.php/"+Page[j][k-2]+"'>"+Page[j][k-3].replace(FoundWord,FoundWord.bold())+"</a><BR>\n";
Result3+="<I>URL: "+Page[j][k-2]+" </I>";
Result3+="<I>Size: "+Page[j][k-1]+"k </I>";
Result3+="<I>Date: "+Page[j][k]+" </I>";
}SamePage=true;
if(i<k-3){LineNr++;if(LineNr>2){break;}
if(Page[j].length>350){Result3+="<LI>..."+Page[j].substr(WordPos-100,200+FoundWord.length).replace(FoundWord,FoundWord.bold())+"...\n";}
else{Result3+="<LI>"+Page[j].replace(FoundWord,FoundWord.bold())+"\n";}}
ResFound=true;}}}
if(!ResFound){
Result3+="<CENTER><U>Nici un rezultat gasit!</U></CENTER>\n";}
Result3+="<P><CENTER>"
Result3+="<a class='h' href='http://www.webdeveloper.com/forum/archive/index.php/javascript:history.back()'>Inapoi</a>\n";
Result3+="<a class='h' href='http://www.webdeveloper.com/forum/archive/index.php/#'>Sus </a>\n";
Result3+="</CENTER></td></tr></table></center></BODY></HTML>";
Result2="<center><B>"+NrRes+"</B> rezultate gasite";
Result2+=" pentru <B>"+SearchWord+"</B>. Cautarea a durat <B>";
Result2+=(Math.floor((new Date()-BeginTime)/10)/100)+"</B> secunde.</center><P>";
this.status="Done";
this.document.open();
this.document.write(Result1+Result2+Result3);
this.document.close();}
else{this.status="Eroare: Trebuie sa introduceti macar un caracter!";}}