Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass the image variable... ? 1

Status
Not open for further replies.

newimprovedmedia

Technical User
Jun 26, 2001
7
US
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=&quot;text/javascript&quot; language=&quot;javascript&quot;>
<!-- Hide code from older browsers
thisImg = 0

function newFolio(direction) {
if (document.images) {
thisImg = thisImg + direction
document.folio.src = &quot;images/&quot; + thisImg + &quot;.jpg&quot;
}
}

// Stop hiding code -->
</script>
</head>

Now the navigation arrows use this <a href=&quot;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.
 
hie
looks like ur question is about &quot;window-to-window communication&quot;..
if it is, this forum has a good FAQ on this..

- usin forms

- usin query string

u also can pass parametres thru window name, but i think, those two methods wuld be enough for startin...

regards, vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top