Hi,
This is my first post here, and I have a question about coding a Javascript slideshow. First though, a little history -- I am entirely self taught with web design... basically, I've learnt things by doing them. I started out with basic HTML and recently decided to redesign my site and add some more "technical" aspects. The tutorials on this site have been really helpful, and I now have a decent understanding of layers, CSS, etc.. On my site, I decided I wanted to have something that worked like a frame, yet wasn't a frame. I found this tutorial and have executed it on one page of my site so far, but have a question.
This is the page I've done -- http://www.crumpart.net/test2/artprints.htm -- none of the links at the top of the page will work yet, as it's the only one I've uploaded. Clicking on the thumbnails to the left should work though -- the full image and description appears in the space next to the thumbnails.
My problem is with this bit of code that was listed in the tutorial:
************************************************
// slide 6 is a special case with timed bullets
// so we call the bullets() function
// to display them sequentially
if(n==6)
{
bullets(true);
}
else
{
bullets(false);
}
}
else // its an old browsers
{
return false;
}
}
// if t is true, a delay is introduced between
// each visible bullet point
// if false, there is no delaty and the bullets are hidden
function bullets(t) // runs through lines 1 to max
{
index=1;
s=t;
if(t)
{
delay=secs*1000;
}
else
{
delay=0;
}
for (i=0;i<=max;i++)
{
time=setTimeout('showit(s)',delay*i);
}
clearTimeout(time);
}
************************************************
It seems to me that it is about the bullet points, which are not relevant to my site, but when I delete this bit of code, the script stops working for me. As I said, I'm very, very new to Javascript, so if I'm doing something obviously dumb, please forgive me! Help/an explanation would be very much appreciated. Thanks.
This is my first post here, and I have a question about coding a Javascript slideshow. First though, a little history -- I am entirely self taught with web design... basically, I've learnt things by doing them. I started out with basic HTML and recently decided to redesign my site and add some more "technical" aspects. The tutorials on this site have been really helpful, and I now have a decent understanding of layers, CSS, etc.. On my site, I decided I wanted to have something that worked like a frame, yet wasn't a frame. I found this tutorial and have executed it on one page of my site so far, but have a question.
This is the page I've done -- http://www.crumpart.net/test2/artprints.htm -- none of the links at the top of the page will work yet, as it's the only one I've uploaded. Clicking on the thumbnails to the left should work though -- the full image and description appears in the space next to the thumbnails.
My problem is with this bit of code that was listed in the tutorial:
************************************************
// slide 6 is a special case with timed bullets
// so we call the bullets() function
// to display them sequentially
if(n==6)
{
bullets(true);
}
else
{
bullets(false);
}
}
else // its an old browsers
{
return false;
}
}
// if t is true, a delay is introduced between
// each visible bullet point
// if false, there is no delaty and the bullets are hidden
function bullets(t) // runs through lines 1 to max
{
index=1;
s=t;
if(t)
{
delay=secs*1000;
}
else
{
delay=0;
}
for (i=0;i<=max;i++)
{
time=setTimeout('showit(s)',delay*i);
}
clearTimeout(time);
}
************************************************
It seems to me that it is about the bullet points, which are not relevant to my site, but when I delete this bit of code, the script stops working for me. As I said, I'm very, very new to Javascript, so if I'm doing something obviously dumb, please forgive me! Help/an explanation would be very much appreciated. Thanks.