Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Jul 27, 2011 23:22:15 GMT
Let's see what PB say
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Jul 27, 2011 23:36:35 GMT
It's allowed
|
|
Cam!
VIP
[M:5000]
Posts: 780
|
Post by Cam! on Jul 27, 2011 23:55:36 GMT
That is good news, although I am surprised that the code won't add any extra stress to the server. I may use this code on my forum then.
|
|
|
Post by (/iPokemon/) on Jul 28, 2011 4:37:58 GMT
It isn't refreshing the whole page, it's changing the source of one image a few times And I would think it would cause more harm to the user viewing it's CPU, not the server.
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Jul 28, 2011 4:46:22 GMT
JS is client side, so it doesn't really affect the server
|
|
Dyr
Junior Poster
Posts: 36
|
Post by Dyr on Jul 29, 2011 14:45:03 GMT
Would someone be able to walk me through the steps to set this up so that, out of the five images, every x hours they would all change to random urls I have when the user refreshes the page? I'd like it so that each image is a different url, that's the part that is a tad too confusing for me to write on my own.
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Jul 29, 2011 15:00:29 GMT
Whats your forum url?
|
|
Dyr
Junior Poster
Posts: 36
|
Post by Dyr on Jul 29, 2011 21:20:24 GMT
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Jul 30, 2011 0:13:44 GMT
So do you want all 5 to change out at the same time? Or did you want them to rotate?
|
|
|
Post by (/iPokemon/) on Jul 31, 2011 3:40:23 GMT
JS is client side, so it doesn't really affect the server Woo hoo for restatement.
|
|
Dyr
Junior Poster
Posts: 36
|
Post by Dyr on Aug 4, 2011 12:24:32 GMT
Hi, I'd love to have it so all five images change at the same time.
|
|
|
Post by (/iPokemon/) on Aug 6, 2011 21:53:51 GMT
This could be tricked out with some jQuery effects to make it look more sleek
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Aug 6, 2011 21:56:07 GMT
Hi, I'd love to have it so all five images change at the same time. What you said here: ah yes it does. Thank you very much! ^^ For multiple images, would I just put in multiple image src's for each hour? such as: if (hour == 6) { document.write("<img src=\"IMGURL\" /> <img src=\"IMGURL\" />"); } Will work
|
|
|
Post by (/iPokemon/) on Aug 6, 2011 21:58:56 GMT
Hi, I'd love to have it so all five images change at the same time. What you said here: ah yes it does. Thank you very much! ^^ For multiple images, would I just put in multiple image src's for each hour? such as: if (hour == 6) { document.write("<img src=\"IMGURL\" /> <img src=\"IMGURL\" />"); } Will work You could make your life easier when document.write()ing, use document.write('<img src="IMGSRC" border="0" alt="picture" /> <img src="IMGSRC" border="0" alt="picture" />'); so you don't have to constantly be escaping You could also put all the images you want to change already in the box with unique id's, and just change the src when the hour changes.
|
|
Dyr
Junior Poster
Posts: 36
|
Post by Dyr on Aug 14, 2011 17:16:16 GMT
How would I go about putting the images in unique box ids like you stated? Javascript is rather new, thanks for letting me see all the options!
|
|
Jordan
Elite Poster
[M:5000]
Posts: 286
|
Post by Jordan on Aug 14, 2011 19:11:33 GMT
Do you want a set of random images for each time of the day? For example, 1:00PM to 2:00PM will have a set of random images only for that hour. OR, do you want a set of random images for all the times? OR, do you want to use the same five images every time, but just have them in a different order which is random each time?
|
|
Dyr
Junior Poster
Posts: 36
|
Post by Dyr on Aug 15, 2011 14:20:24 GMT
I'd want a set of images for only that hour, each time the images would change to new ones. I was thinking would it be possible to set-up an array with this? I know how to set-up an array (list of urls) and have the image change each hour to a random image from that list, but can't figure out how I would do that with multiple images.
|
|