Jump to content


Photo

Random scrolling images?


  • Please log in to reply
4 replies to this topic

#1 supermerc

supermerc
  • Members
  • PipPipPip
  • Advanced Member
  • 365 posts

Posted 29 October 2006 - 03:13 PM

Hi, I'm currently working on coding my first website in php, i usually use html and never finish them because you cant do enough in html. Anyways, my site is http://xgame6overx.com/random If you look on my site there are images scrolling horizontaly under random stuff bar.

I was wondering if it was possible to have them scroll in random order, right now they always apear in same order, and when theres going to be more images there and the ones near the end will never be seen.

Im also wondering if there a better horizontal scrolling script, mine isnt soft, it restarts in the middle and doesnt look smooth.

Please help me! ???

Supermerc.

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 29 October 2006 - 03:22 PM

Javascript is what your looking for. php runs on the server, not the client.

#3 supermerc

supermerc
  • Members
  • PipPipPip
  • Advanced Member
  • 365 posts

Posted 29 October 2006 - 03:29 PM

I dont understand what you mean.
But what I want is that it randomly places images from my folder, they are each called like thumb-1.jpg -2 -3 etc, and they match photo-1.jpg etc. And when you click on the thumbs it opens the photo's. And i wan t them to scoll like they do now

#4 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 29 October 2006 - 03:40 PM

I dont understand what you mean.


See how your script is written in Javascript? That is what you need not php, php cannot create scrolls or any other client side features. Of course you could have php load the images into a Javascript array at random but why? Your best doing all this with Javascript, not php.

#5 supermerc

supermerc
  • Members
  • PipPipPip
  • Advanced Member
  • 365 posts

Posted 29 October 2006 - 03:44 PM

Sooo... its possible to have the images apear random in javascipt?
If soo do you have anyidea how or where  could learn about it?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users