Click to See Complete Forum and Search --> : Combining Java Scripts (rollover and popup)
ffacker
12-10-2003, 11:03 PM
I'm putting together a site for a movie at http://mustangfoto.com/bfdmovie/bfd.html
I used a rollover script for the menu and I used a pop-up script for the gallery. Now for the cast section I wanted to have each picture show the person's name on rollover and then pop-up the window details about them. How do I combine a rollover over and a popup? All my attempts have resulted in a picture that doesn't do either.
Thanks for any help.
-Fred
David Harrison
12-11-2003, 01:14 PM
Here's a script for you. I modified one of my others and came up with this. The images are named big0 - big6 and the thumbnails thumb1 - thumb7. If you want to change the names of the big images you will have to change the names on the page (many times I'm afraid) but only once in the .js file, here:
imgwin.document.writeln('<p style="text-align:center;"><img src="big'+imgnum+'.png" alt="'+imgdesc+'"><br>'+imgdesc+'</p><p style="text-align:center;">');
The captions are held in span tags underneath the thumbnails with systematic names:
<span id="im7">Image 7</span>
The number in the id corresponds to the image (obviously).
I have included a simple CSS layout which consists of some div tags lined up next to each other for presentational purposes.
Can I suggest that you do not use frames on your page, the images down the side went off the bottom of the screen just slightly and I was viewing it maximised at 1024x768, I dread to think what it might be like on 800x600 or even 640x480. At the ver least allow that frame to scroll.
ffacker
12-11-2003, 02:30 PM
Thanks lavalamp. Unfortunately I can't mess with the site here at work, but I'll plug that script in and try it out as soon as I get home.
As for the frames thing, I wanted the filmstrip to look continuous, so I put that extra graphic on the bottom of it that sometimes loads on the screen, sometimes trails off, but it isn't an actual button. I have run into a problem on one computer where the whole page loads too big for the screen, so the filmstrip is cut in half down the middle and my main page is cut off. I haven't figured out how to solve that problem yet.