TrvlOrm
05-05-2004, 02:08 AM
HI There,
I have been struggling with JavaScript code for days now, and this is my last resort! Please help...send replies or futher information to ksorman@shaw.ca
I am trying to create a JavaScript slide show with links for Next Slide, Previous Slide and Home Slide.
Is it possible for you to view my page and tell me what I am doing wrong. I have looked at this page for hours and can't figure it out, I must be missing something or have something in the wrong order, but can't figure it out...please help....thanks...
I think I need someone to explain the EXACT code for this page as it would appear in the page so it displays correctly.
If you can figure this out, I have 2 more I need help with too...
Thanks so much, Much appreciated...but this is a URGENT request. Need a quick answer that will work!
Any ideas????
Here is my code:
<HTML>
<HEAD>
<TITLE>JavaScript Slide Show - PhotoAlbum</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var PhotoAlbum = new
Array("bunny_lady.gif","business_lady.gif","running_lady.gif","color_lady.gif")
var PicIndex=1
var pictures=PhotoAlbum.length
function NextImage ( ) {
if (PicIndex < pictures) {
PicIndex++
}
document.ImgAlbum.src=PhotoAlbum[PicIndex-1]
}
function PreviousImage ( ) {
if (PicIndex > 1) {
PicIndex--
}
document.ImgAlbum.src=PhotoAlbum[PicIndex-1]
}
function home ( ) {
document.ImgAlbum.src=PhotoAlbum[0]
}
</SCRIPT>
</HEAD>
<BODY BACKGROUND=BACK02.jpg TEXT=Blue>
<CENTER>
<H1 ALIGN=Center> The Vacation Photo Album</H1><BR>
<H3 ALIGN=Center> Click on Previous or Next to view pictures in my Slide Show </H3><HR><HR>
<IMG SRC=bunny_purse.gif NAME= ImgAlbum Width=400 Height=270>
<BR>
<HR>
<A HREF="JavaScript:home ( ) ">[First Image]</A>
<A HREF="JavaScript:PreviousImage ( )">[Previous Image]</A>
<A HREF="JavaScript:NextImage ( )">[Next Image]</A>
</CENTER>
</BODY>
</HTML>
I have been struggling with JavaScript code for days now, and this is my last resort! Please help...send replies or futher information to ksorman@shaw.ca
I am trying to create a JavaScript slide show with links for Next Slide, Previous Slide and Home Slide.
Is it possible for you to view my page and tell me what I am doing wrong. I have looked at this page for hours and can't figure it out, I must be missing something or have something in the wrong order, but can't figure it out...please help....thanks...
I think I need someone to explain the EXACT code for this page as it would appear in the page so it displays correctly.
If you can figure this out, I have 2 more I need help with too...
Thanks so much, Much appreciated...but this is a URGENT request. Need a quick answer that will work!
Any ideas????
Here is my code:
<HTML>
<HEAD>
<TITLE>JavaScript Slide Show - PhotoAlbum</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var PhotoAlbum = new
Array("bunny_lady.gif","business_lady.gif","running_lady.gif","color_lady.gif")
var PicIndex=1
var pictures=PhotoAlbum.length
function NextImage ( ) {
if (PicIndex < pictures) {
PicIndex++
}
document.ImgAlbum.src=PhotoAlbum[PicIndex-1]
}
function PreviousImage ( ) {
if (PicIndex > 1) {
PicIndex--
}
document.ImgAlbum.src=PhotoAlbum[PicIndex-1]
}
function home ( ) {
document.ImgAlbum.src=PhotoAlbum[0]
}
</SCRIPT>
</HEAD>
<BODY BACKGROUND=BACK02.jpg TEXT=Blue>
<CENTER>
<H1 ALIGN=Center> The Vacation Photo Album</H1><BR>
<H3 ALIGN=Center> Click on Previous or Next to view pictures in my Slide Show </H3><HR><HR>
<IMG SRC=bunny_purse.gif NAME= ImgAlbum Width=400 Height=270>
<BR>
<HR>
<A HREF="JavaScript:home ( ) ">[First Image]</A>
<A HREF="JavaScript:PreviousImage ( )">[Previous Image]</A>
<A HREF="JavaScript:NextImage ( )">[Next Image]</A>
</CENTER>
</BODY>
</HTML>