brendandonhue
05-20-2003, 05:01 PM
In another thread, I came up with a script to expand/contract an image. Demo at
http://mywebpages.comcast.net/brendandonhue/file.html
The problem is...you can't have multiple images expand with the script. I know exactly why, and attempted a few ways at fixing it, but it didnt work.
The problem is, it references which image to use by document.images[0].
If there are multiple images in the page, they wouldnt all be document.images[0], the next one is document.images[1].
I have added another argument to my function so that you could include the image's number as a variable in the function.
It does the 1st expansion (it does the full expansion in increments of 2 pixels), but it uses SetTimeOut to repeat the expansions, and the image number argument doesnt get passed when i do the settimout.
I know...this is really confusing. Please tell me if there is anything I need to clarify on.
Much thanks.
http://mywebpages.comcast.net/brendandonhue/file.html
The problem is...you can't have multiple images expand with the script. I know exactly why, and attempted a few ways at fixing it, but it didnt work.
The problem is, it references which image to use by document.images[0].
If there are multiple images in the page, they wouldnt all be document.images[0], the next one is document.images[1].
I have added another argument to my function so that you could include the image's number as a variable in the function.
It does the 1st expansion (it does the full expansion in increments of 2 pixels), but it uses SetTimeOut to repeat the expansions, and the image number argument doesnt get passed when i do the settimout.
I know...this is really confusing. Please tell me if there is anything I need to clarify on.
Much thanks.