![]() Preserved Topic: Arrays (Page 1 of 1) |
|
---|---|
Maniac (V) Mad Scientist From: Azylum's Secret Lab |
![]() Hi, i have this code to make that some random image change everytime that the pag is reloaded (Thanks Bitdamage, DL and mr.Max!) but now, i want a different URL and a different "alt" text foreach one, i know that i have to do a matrix (or an Array?) but i'm still lost in the topic... |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() Although you can use objects to simplify things, it's easier like this: |
Maniac (V) Mad Scientist From: Azylum's Secret Lab |
![]() Hey! i've never seen an array with my name! |
Maniac (V) Mad Scientist From: Azylum's Secret Lab |
![]() Just E-X-E-L-E-N-T!!! |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() An important note: |
Maniac (V) Mad Scientist From: Azylum's Secret Lab |
![]() Welcome to the real world.... |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() Wakkos, you didn't add the closing </A> tag to the array elements. And you don't need that "var upper_limit = 1" definition anymore... |
Maniac (V) Mad Scientist From: Azylum's Secret Lab |
![]() Thank you mr.Max! |
Paranoid (IV) Inmate From: Lebanon |
![]() mr.Max I checked your rotate script.pl. code: <?
|
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() Since script has to be called directly from <IMG> tag, it is best not to do any redirections. Some web browsers (i.e. NN4) won't understand it correctly and either won't display anything or will always display the same image (when you click on reload). So, at the end it's best to trick the browser to think that it is actually image and not the script. |