TrvlOrm wrote:[color=blue]
> HI There,
>
> I have been struggling with JavaScript code for days now, and this is
> my last resort! Please help...
>
> 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...Need a quick answer that will work!
>
> Any ideas???? Can someone please tell me what I'm doing wrong, or what
> I have missed out....
>
> 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","runnin g_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>[/color]
First your IMG tag change NAME= ImgAlbum to ID="ImageAlbum"
Then change all references of document.ImgAlbum.src to
document.getElementById("ImgAlbum").src this will make it compatible
with the more modern versions of netscape/mozilla/firefox.
Those are the obvious problems, check back if it doesn't work.
----------
http://www.hunlock.com -- DHTML for the masses.