Search in forum:
Search


Author Message
Post09/06/2008 at 4:52pm (UTC)    
Post subject: code for random image generator.

does anybody have the correct html code for creating a random image generator please? not even sure if it be html or javascript so any advice would be most welcoming. thank you. Alison xx
Post09/06/2008 at 5:53pm (UTC)    
Post subject:

hi dear
i dont know what u mean exactly.
if u mean slide show it has PHP code and am not sure it works here



website programmer
Post09/06/2008 at 6:41pm (UTC)    
Post subject:

basically what i want to do is to have a new image on show every time the homepage is loaded, from a selection of 5 or 6 images. i cant seem to find a code that works effectively.
Post09/06/2008 at 10:32pm (UTC)    
Post subject:

hi again dear Ali
Always i have
it's very easy just change : img 1, img 2, img 3,....., img 6 into ur images name
Code:

<script>
img = new Array("img1.gif","img2.gif","img3.gif","img4.gif","img5.gif","img6.gif");

num =Math.floor(Math.random()*img.length);
str=img[num]+" ";
document.write('<img src=' + str +'>');
</script> 


and note that the path of ur images my be GIF or JPG or anther.
Wink







website programmer
Post09/06/2008 at 11:29pm (UTC)    
Post subject:

Awww thank you very much mahdi, will try that one tomorrow and let you know how it goes. thanks again.
do have another question. regarding uploading buttons. i have made some and will upload them soon but how do i find the url so the images show up in my website?want the buttons to direct users to my blog etc but need the url for the buttons. please help lol thank you again x Alison x
Post09/07/2008 at 12:09am (UTC)    
Post subject:

it's easy
just open the page u want the visitors to visit and copy the adress from the browser bar and what kind of buttons u'll use HTML or JIF IMAGES
any way it's like when u deal with images
for example ::
click right button of mouse on any image on the page
and chose PROPERTIES u'll got the url of this image
so just copy it.
see u Wink


Last edited by mymahdi on Sun Sep 07, 2008 12:33 am; edited 1 time in total
Post09/07/2008 at 3:21pm (UTC)    
Post subject:

wow that random image generator code is awesome! so good iv used it twice on my homepage Smile its fab. think ill leave the buttons though,its makin my site look untidy. but thank you for your help,specially the random image script, bless you. Alison xx
Post09/07/2008 at 8:18pm (UTC)    
Post subject:

You are WELCOME
Display posts from previous:   


Powered by phpBB © 2001, 2005 phpBB Group