Click to See Complete Forum and Search --> : How do you refresh an image when page refreshes?
TammyP
05-22-2004, 08:19 AM
Hi,
I have a client website that features a gallery of photos. I would like to feature a different photo on the index page each time the index page refreshes. I know how to use frame animation to view a scroll through of photos but this is not what I'm going for, I'm wanting a new static photo to appear each time the page is refreshed.
I use an older version of Fireworks and DreamWeaver (version 3) so if someone could advise me how to do it in either of those, or in straight html code I would greatly appreciate it. I have a feeling this is an easy thing to do but I haven't had need for it before so have never attempted it.
Thank you so much!
Tammy
tlpinkston@webngraphicdesign.com
Big Perm-dizzle
05-22-2004, 09:08 AM
javascript.....here is a link to a tutorial
www.javascript-page.com/ranimage.html (http://www.javascript-page.com/ranimage.html)
oh and welcome to the GDF......
JUST LAUNCHED - www.hirethisdesigner.com (http://www.hirethisdesigner.com) - check it out
TammyP
05-22-2004, 11:13 AM
Hi,
Thanks for the reply...I really haven't done much with javascript so I didn't even think about that but I've looked at the page and it's clear as day - thanks!
I also looked at your website...it's nice, you do good work. I particularly like your Shih Tzu page (because I'm an animal lover and have had a Shih Tzu - I currently am owned by 2 Golden Retrievers!) Not to be critical, but I know you're looking for a graphic design job so potential employers might notice this too...you've got a typo on the home page, 1st sentence that says 'Allan Branch is seeking a graphic design job' - design is misspelled. You're website looks great and I'm sure a great company will notice you!
Here's one of my websites - in fact, the one I want to do the rotating photo on:
http://www.spiritofthebuffalo.org/ The project is similar to Cows on Parade (if you've heard of that) only done with buffalo.
Thanks again for your help! Tammy
Big Perm-dizzle
05-22-2004, 07:49 PM
hey tammy thanks for the heads up I am the king of typos...I got a job about 2 weeks after I uploaded that site....I have a golden retriever too I did a trade out for this site www.goldenheaven.com (http://www.goldenheaven.com) he is 3 months old and 50 pounds
Welcome Again and stick around there is tons and tons of info on this site as well as plenty of cool people
JUST LAUNCHED - www.hirethisdesigner.com (http://www.hirethisdesigner.com) - check it out
TammyP
05-23-2004, 12:32 AM
Hi again,
Congrats on the job you got 2 weeks after uploading your site!
I love the Golden Retriever site! I've had dogs all my life and 6 years ago was the first time I got a Golden, got her as a pup (Maggie, the red one) then I adopted a second 3 years ago (Abby, the blonde one). They're both 6 and both wonderful dogs. I absolutely LOVE Goldens! That was a great trade out, a Golden puppy!
I'll definitely stick around - there does seem to be tons of info here.
Thanks again, Tammy
TammyP
07-18-2004, 05:52 AM
Hi Allan,
I posted a question a couple months ago about refreshing random images on one of my client websites and you helped me out...I'm the one who also has Goldens - by the way, I LOVE the picture of your pup! I think they ALL love doo doo sandwiches...yesterday mine got into the cat's litter box, and it's scoopable so it practically cemented her mouth shut - sooo disgusting!
Anyway, I am stumped again with a similar question...this time I have a photography client website that wants 9 thumbnail photos on a page which will alter with 9 other thumbnail photos and of course we want the thumbs to link to the full size view. Basically I've set up a 3 column, 3 row table with the first set of thumbs, and now I need to figure out how to alternate with the 2nd set of thumbs and be able to link them individually. I have Fireworks 3, and I can make a 2 frame graphic but the hot spot links both frames so that doesn't work. And the random image trick I learned that worked so great on my other client's website doesn't seem to work with this because I don't want the same picture to show up 4 times (or whatever) and then the 2nd one to show up, I want them to alternately rotate.
I'm stumped - is there a way to do this?
Is your pup eating everything in sight? I have one who likes to eat cloth (including the couch when the mailman goes by) - if I leave any thing cloth (like socks) on the floor, she will eat them. Oy!
Thanks for your help!
Tammy
Big Perm-dizzle
07-18-2004, 09:37 AM
wow I am confused...
you basically want a one gallery that 'flip flops' between to sets of 9 pictures???
Wayne: Our enemy is wicked, so...
J.D.: Dude, she's Freddy Krueger.
Wayne: Damien.
J.D.: Dude, she's Vader.
Wayne: No! She's the Emperor.
J.D.: Yeah, but with really great ****.
pixelmonkey
07-19-2004, 12:00 AM
best way to go around this will require some more info from you...
what server based languages do you have to use? php . perl ???
i'm thinking the javascript option is out since you want to do a galary of 9 photos. it seems javascript based works well for one, but getting all 9 to load quickly will be almost impossible. a database with a randomizer for the 3 fields of photos within php would work nice, BUT it does require the server to be setup with it.
let us know what os the server has, what versions of what it has, and what options you have for a DB.
chris<pixelmonkey>:D
D-Frag
I want to thank.... and above all PORN! for making my life much better :D
TammyP
07-19-2004, 04:21 AM
Thanks for the response....and sorry about the confusion. Here's the actual page: http://www.shawneecolorlab.com/weddings.html I have one set of 9 thumbnail photos that when individually clicked open a browser window to display the larger view of the photo. The client would like another set of 9 to alternate with these which would also be clickable. Their goal is to show samples of 18 photos on the page by alternating 2 sets of 9.
Big Perm-dizzle
07-19-2004, 07:02 AM
why not have just two viewable pages of 9 image each... why must they be random???
Wayne: Our enemy is wicked, so...
J.D.: Dude, she's Freddy Krueger.
Wayne: Damien.
J.D.: Dude, she's Vader.
Wayne: No! She's the Emperor.
J.D.: Yeah, but with really great ****.
TammyP
07-19-2004, 11:01 AM
Hi Allan,
Well, yeah, two viewable pages of 9 photos each would work, they don't have to be random, two fixed pages of 9 each would work perfectly well...is it possible to alternate those two pages, such as each time a person's browser refreshes one of the two pages comes up? i.e. can this be accomplished without the viewer having to click to go to the 2nd page view? I don't know how to do that, but if it's possible it would work great.
Thanks, Tammy
pixelmonkey
07-20-2004, 04:22 PM
ok...
given i cant view the server right now, your best bet would be to look into 'random.pl' perl script from several free sites. this script has a randomizer for photos, printing out the photos url to be displayed within the code each time the page is loaded. you can add a <a> tag with all the javascript options so it will still open in a new window with any other variable you want added.
now the catch...
this script is setup for 1 photo at a time. if you work around a few lines you can do a print by directory of all photos contained within the dir. just have one with the first 9, and another with the 2nd.
hope it helps!
chris<pixelmonkey>:D
D-Frag
I want to thank.... and above all PORN! for making my life much better :D
Benjamin
07-21-2004, 01:04 AM
Perhaps you could have 2 layers, and use Javascript to automatically show and then hide the top layer at a given time interval.
http://www.jackfruitdesign.com/
Om Namah Shivaya
uncle carbunkle
07-21-2004, 07:35 PM
i don't know what i'm talking about AT ALL, but...
...couldn't you make the thumbnails part of a seperate html page or flash movie? have 2 of them that alternate? one page, 2 alternating sets of thumbnails? like, iframes or something...?
!!!Laissezles Bon Temps ROULEZ!!!
Benjamin
07-22-2004, 03:31 AM
If you follow my suggestion I think you will get what Uncle is kind of talking about.
The javascript would be very minimal and so it should be fairly efficient (still depends on the size of the thumbnails of course).
You have one <div> on top of another (i.e. its z-index value set to higher). Then the javascript just has to change the display property to visible or hidden in order to switch.
http://www.jackfruitdesign.com/
Om Namah Shivaya
Ryan8720
07-22-2004, 07:31 AM
But if JavaScript is disabled, you're screwed.
http://edgewebdesign.org/ryan2.gif (http://www.edgewebdesign.org)
If it weren't for the last minute, nothing would ever get done.
Never put off till tomorrow what you can avoid all together.
Benjamin
07-22-2004, 01:35 PM
I don't think she'll get anything to automatically shift between the 2 sets of pictures without using Javascript, do you?
OK, maybe Java or Flash but those are just as dependent on browser configuration.
I agree I would probably avoid this whole automatic shift thing altogether but it's what she was specifically asked for.
Of course if she doesn't want it to automatically shift between the 2 but only when the viewer presses 'refresh' or next time they visit then she can just use PHP to deliver one of the 2 sets of thumbnails on a random basis. But to make sure it always shifted over, she'd have to keep track of which one is displayed right now, which I guess could do by appending a value to the URL.
http://www.jackfruitdesign.com/
Om Namah Shivaya
danjam
09-25-2006, 10:59 AM
Here is an image viewer, in object-oriented, cross-browser JavaScript. Very easy to plug and play, with "slide show" feature, and fully customisable in CSS and HTML:
http://www.webonweboff.com/widgets/js/image_viewer.aspx
Article includes a demo, source code, explanations.
Hope this helps...