newimprovedmedia
Technical User
I am pretty new to using javascript, I think this might be a simple problem. I am using a simple image rotation script to display an ordered series of 25 images. Okay, that was the easy part, but I link to this page from my index.html page which displays an image map of all 25 images as small icons.
The idea is to click on the icon of the image and then the next page which has the image rotation script will display that image and then you would be able to cycle back and forth through the series.
here is the script I am using:
<head>
<script type="text/javascript" language="javascript">
<!-- Hide code from older browsers
thisImg = 0
function newFolio(direction) {
if (document.images) {
thisImg = thisImg + direction
document.folio.src = "images/" + thisImg + ".jpg"
}
}
// Stop hiding code -->
</script>
</head>
Now the navigation arrows use this <a href="javascript:newFolio(-1) or newFolio(1) to add or subtract from the thisImg variable. I just can't figure out how to link from the image map and pass the image number into the page with the rotation script.
Did I explain this clearly? I know it will be a usefull script once i bang it out.
The idea is to click on the icon of the image and then the next page which has the image rotation script will display that image and then you would be able to cycle back and forth through the series.
here is the script I am using:
<head>
<script type="text/javascript" language="javascript">
<!-- Hide code from older browsers
thisImg = 0
function newFolio(direction) {
if (document.images) {
thisImg = thisImg + direction
document.folio.src = "images/" + thisImg + ".jpg"
}
}
// Stop hiding code -->
</script>
</head>
Now the navigation arrows use this <a href="javascript:newFolio(-1) or newFolio(1) to add or subtract from the thisImg variable. I just can't figure out how to link from the image map and pass the image number into the page with the rotation script.
Did I explain this clearly? I know it will be a usefull script once i bang it out.