rpmusic
08-26-2002, 02:05 PM
I'm trying to generic 'atise the following DHTM/Javascript scrolling window function.
The function gets passed an array Object which contains the id of the scrolling DIV layer.
It works on the first passing, however this line -
scrTmId = setTimeout("scrollDown("+wndo+","+num+","+inc+")",scrTimer);
results in an javascript error "] expected"
I can't work out how to pass back the orginal refernce to the function
The full page can we see at www.rarepleasures.co.uk/index2.htm
function scrollDown(wndo,num,inc) {
if (!pgLoaded) return;
var y = parseInt(wndo[num].cnt.css.top);
if (y>-wndo[num].maxY) {
wndo[num].cnt.shiftBy(0,-inc);
scrTmId = setTimeout("scrollDown("+wndo+","+num+","+inc+")",scrTimer);
}
}
The function gets passed an array Object which contains the id of the scrolling DIV layer.
It works on the first passing, however this line -
scrTmId = setTimeout("scrollDown("+wndo+","+num+","+inc+")",scrTimer);
results in an javascript error "] expected"
I can't work out how to pass back the orginal refernce to the function
The full page can we see at www.rarepleasures.co.uk/index2.htm
function scrollDown(wndo,num,inc) {
if (!pgLoaded) return;
var y = parseInt(wndo[num].cnt.css.top);
if (y>-wndo[num].maxY) {
wndo[num].cnt.shiftBy(0,-inc);
scrTmId = setTimeout("scrollDown("+wndo+","+num+","+inc+")",scrTimer);
}
}