Click to See Complete Forum and Search --> : Whats the best way


oo7ml
05-08-2007, 09:39 AM
My page randomly gfenerates images. i want to create a next button that makes the page randomly generate a new image

Do i only need to create a button that refreshes the page to do this or is this a bad way of doing things

dzysyak
05-08-2007, 01:22 PM
Yes, you can do this way (in most cases this should work), or you can just change src property of the image to avoid page refreshes. Something like:


document.getElementById('ImageId').src = 'image.php?rand=<?=mt_rand();?>';



Sergiy,
PHP/MySQL/AJAX web site development (http://site4fast.com)