Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am using Frontpage to create my homepage and wanted to be able to
have the image refresh everytime someone visits the site. e.g. i have 5
pictures and each time there is a visitor he/she may see image1 or
image 4, etc.

i want to do this without having the whole page refreshed.

i have tried different html codes but have come up empty. i have tried
using php codes and same result. i have heard that this html code is
fairly easy to manage.

i have files on my desktop and on my server, hope this helps.



Le Thu, 20 Jul 2006 00:32:14 +0100, nice.guy.nige a écrit :

Quoted text here. Click to load it

An iframe could do it.. but it is not of good taste to me.

-- Mike Massonnet (mmassonnet)           ,-.
                                                     ,      ( {o\
 GnuPG 0--" 0xF8C80F97                               {`"=,___) (`~
 C4DA 431D 52F9 F930 3E5B  3E3D 546C 89D9 F8C8 0F97   \  ,_.-   )


Mike Massonnet wrote:
Quoted text here. Click to load it

No it couldn't, not by itself anyway

Quoted text here. Click to load it

Hmmz, how hard is it to:

$images = array('image1.jpg', 'image2.jpg, 'image3.jpg'......);
$rand = mt_rand(0, (count($images-1));
echo '<img scr="'.$images[$rand].'" alt="You_do_provide_an_alt_do_you?"/>';

Rik Wasmus


Quoted text here. Click to load it

Bad idea!

FrontPage is a bad product and makes bad sites. It also encourages web
design as a "black box" with no understanding. When you're working at
this level, you're starting to run off the edges of what it's capable

Quoted text here. Click to load it

You need some scripting to do this, but it can be either server-side
(maybe PHP?) or client-side (JavaScript).

It's a good use for JavaScript, because it's easy to do, doesn't
require the page to be refreshed, and the complaints of "What happens
if JavaScript is disabled?" don't matter because it's only an "extra"
feature, not an essential one.

Make a plain HTML page (no need for an iframe) that loads up a couple
of images. Get the presentation right.

Now add some JavaScript to the <body onload="..." > event. Randomly
load some other images and swap them in. Possibly add a timer to change
them in the future. This is all easy, standard stuff, so some web
searching should find examples. You might search under "banner ad
rotator".  I suggest you don't load _random_ images, but instead base
them on the browser's clock. This tends to change more evenly and to
look "more random" in practice.

If you do this server-side it's easy too. Just choose the images before
sending the page. Also make sure that page caching is short enough that
the page gets re-loaded when it's time to change the images. Even using
the <meta> tags is enough, if a little crude.

I also suggest you keep these images in their own directory with names
1.jpg ... 10.jpg etc.  They can easily be copied and duplicated from
other parts of the site.  This way you can easily set whole new sets of
images, if you want to make a major update (holiday themes etc.). It's
also to check your images are the right size!

Quoted text here. Click to load it

Then choose the client-side approach, but this isn't really a big issue
anyway. It's OK to let the page re-load "wastefully" a few times, if it
saves you coding effort.

Quoted text here. Click to load it

You can't possibly do this in pure HTML alone.

Site Timeline