PDA

View Full Version : maybe its javascript but i dunno


RickyP
09-22-2005, 05:25 PM
ok, so im still learning...

http://computersense.org/

^^ that is where my problem lies. Im trying to set it up so that when you click on "Around" or "Dorm Room" or "Randomness" it will display a new picture in the box it goes with. Now threw multiple and multiple pages im sure i could do this... but im thinking that there is a way that i could....

EX:
put all the images for "Around" in a certain folder, and then when you click on the button it will go threw the folder in a certain order (i don't really care the order).

and same for dorm room, and randomness...

am i completely crazy? or is this possible?

maskd
09-22-2005, 07:41 PM
So you mean a random image script?

Google (http://www.google.com.au/search?q=javascript+random+image&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official) shows heaps of random image scripts, which are easily customisable, all you need to do is add two more array's of images and tell it to randomise each one and then write them to the page.

I'd do it for ya but I'm a bit busy at the moment.

RickyP
09-22-2005, 09:11 PM
yea... i guess kinda of in a way, but its more important for the image to change when you click the button that goes with the box, not when you load the page.

so like, the page loads, all image boxes have an image in them, (doesn't matter if its random or not), and then when i click the title of the box, it changes to a new image.

oh and im very very newb at javascript... i can understand it for the most part, and if shown an example i could learn from it... but when you say "write it to the page" im not exactly sure what you mean.... if you mean just to put it into my html, then i understand... but if not im lost.

BUT after a close look at the search results you get, i guess i should be asking...

IF i was to set it up so that when the image is refreshed it is a new random image....is it possible for me to only refresh that one image box by using a button link?


im probably not making myself very clear....sorry :(

Horus_Kol
09-23-2005, 03:05 AM
you need to look into solutions for pre-loading images - you can have a javascript which downloads a number of images, and select to display certain ones on an event (like a mouseclick or other).