Click to See Complete Forum and Search --> : Double Status Bar Errors some help?


TheDragon
03-10-2003, 11:31 AM
Greetings, I was attempting to use the Double Status Bar js-sorce code here (http://javascript.internet.com/scrolls/double-status-bar-message.html) and found 2 errors.

The first is easily corrected by viewing the sorcecode of the page to find out that <BODY onLoad="timerONE=window.setTimeout('scrollit_r2()"> should be replaced w/<BODY onLoad="timerONE=window.setTimeout('scrollit_r2l(100)',500);">
Which leads me to the second error that I can't find. When running this modified version I now getRun time error Line 0 object expected which will not pass any info to my debugger.

Has anyone found out why this is so. The code works on the js sorce page but not on it's own. :confused:

:mad: Unfortunately the author (Bryan Pieterse)'s website is a childish maze of sloppy js code and a myriad of popup allerts to be avoided at all costs. :mad:

Thanks

Dan Drillich
03-10-2003, 12:29 PM
After applying your fix, it works beautifully in IE 6.

TheDragon
03-10-2003, 03:14 PM
I'm trying to reverse engineer my site to IE4+ and netscape4.5+ and on both I get that object error on line 0 (which there isn't a line 0)
the java site works in these browsers but not the code it's self
Revise (corrected code)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<!-- TWO STEPS TO INSTALL DOUBLE STATUS BAR MESSAGE:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Bryan Pieterse -->
<!-- Web Site: http://www.angelfire.com/me4/favourites/ -->
<!-- Begin
function scrollit_r2l(seed)
{
var m1 = " offering Free Scripts ";
var m2 = " .... ";
var m3 = " Visit Us Now! ";
var m4 = " Youm may add as many messages as you like! ";
var m5 = " LOOOK........ Great!! ";
var msg=m1+m2+m3+m2+m4+m2+m5;
var out = "Javascript Source ";
var c = 1;
if (seed > 100) {
seed--;
var cmd="scrollit_r2l(" + seed + ")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit_r2l(100)",75);
}
}
}
// End -->
</script>


<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY onLoad="timerONE=window.setTimeout('scrollit_r2(100)',500)">

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.84 KB -->
</html>