rob86
07-10-2007, 01:13 AM
I found this neat script and it won't work. I ran it through Fire Fox debugger and had all kinds of errors I new nothing about. From the browser versions in the script, it might be old.
The attached doc is a html.
Would some kind soul look at it for me.
All help appreciated.
ablaye
07-10-2007, 05:36 AM
What script are you talking about??? I don't see anything.
rob86
07-15-2007, 10:12 PM
The script won't run in IE.:mad:
If I make the text message longer, the script gives a blank page.:confused:
The file is html
_Aerospace_Eng_
07-16-2007, 06:52 AM
Just post the script here. I'm not about to download a file just to view a script. Help us help you.
rob86
07-16-2007, 10:10 PM
Thanks 4 responding
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Title Animations</TITLE>
<Script Language="Javascript">
// Script by Lefteris Haritou
// Copyright ©1998
// http://www.geocities.com/~lef
// This Script is free as long
// as you keep the above credit !
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
if ((bname=="Netscape" && bversion>=5) || (bname=="Microsoft Internet Explorer" && bversion>=7)){
if (document.layers){ //if (bname=="Netscape"){
brows=true
del=30
}
else{
brows=false
del=80
}
var msg=0;
var z=0;
var timer1;
var message= new Array();
var color= new Array();
var values= new Array('-6','-5','-4','-3','-2','-1','+1','+2','+3','+4','+5','+6')
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the Script except the lines below)
message[0]='Title Animations'
color[0]='#FF0000'
message[1]='A new JavaScript'
color[1]='#0000FF'
message[2]='Fully customizable and easy to use'
color[2]='#FFFF00'
message[3]='© 1998 Lefteris Haritou'
color[3]='#FFFFFF'
message[4]='Netscape 4 and Internet Explorer 4 supported'
color[4]='#00FF00'
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the Script except the lines above)
function $(refId) { return document.getElementById(refId); }
function start(){
if ((bname=="Netscape" && bversion>=5) || (bname=="Microsoft Internet Explorer" && bversion>=7)){
if(z<values.length){
if (brows){
document.layers['text'].document.writeln('<P Class="main" Align="Center"><font color="'+color[msg]+'" size="'+values[z]+'" face="Arial"><NOBR>'+message[msg]+'</NOBR></font></P>')
document.layers['text'].document.close();
}
else{
$("text").innerHTML='<Pre><P Class="main" Align="Center"><font color="'+color[msg]+'" size="'+values[z]+'" face="Arial"><NOBR>'+message[msg]+'</NOBR></font></P></Pre>'
}
z++;
timer1=window.setTimeout('start()',del)
}
else
chg();
}
}
function stop(){
if ((bname=="Netscape" && bversion>=5) || (bname=="Microsoft Internet Explorer" && bversion>=7))
window.clearTimeout(timer1);
window.clearTimeout(timer2);
}
function chg(){
if (brows){
document.layers['text'].document.writeln('')
document.layers['text'].document.close();
}
else
$("text").innerHTML='';
if(msg<message.length-1){
msg++;
}
else
msg=0;
z=0;
timer2=window.setTimeout('start()',1000)
}
}
</Script>
</HEAD>
<BODY BGCOLOR="#000000" LINK="#FF0000" VLINK="#FF0000" ALINK="#FFFF00" TEXT="#000000" onLoad="start()" onUnload="stop()">
<Div id="text" style="position: absolute; left: 30px; top: 80px">
//</Div>
//<Layer name="text" left=4 top=80>
//</Layer>
<script language="javascript">
// Returns the browser application name
// for example, "Microsoft Internet Explorer" or "Netscape"
document.write(window.navigator.appName);
// Returns the internal code name of the browser
// for example, "Mozilla"
document.write(window.navigator.appCodeName);
// Returns the version of the browser as a string
document.write(window.navigator.appVersion);
// Returns the user agent string for the browser
document.write(window.navigator.userAgent);
</script>
</BODY>
</HTML>
_Aerospace_Eng_
07-16-2007, 10:26 PM
While yes some of that code is outdated it still seems to work fine. I get no JS errors in Firefox.
rob86
07-16-2007, 11:14 PM
Thanks for responding.
It won't work in IE 6 :( and if I make the text longer the script stops working.:confused:
I would like to put 3 lines of text for each message.:)
Update:
Problem has been solved.
Thank you all.