random image script question
Scott
Manila-Newbies@userland.com
Mon, 16 Dec 2002 11:37:55 -0800
Good Morning, J=F6rg
I removed the second (glossRef), added my image names, and then pasted the=
script into my homepage template.
{if (random(1, 6) =3D=3D 1)
{pictureRef("Ellsworth in Idaho")}
else {if (random(2, 6) =3D=3D 2)
{pictureRef("Ellsworth in Nova Scotia")}
else {if (random(3, 6) =3D=3D 3)
{pictureRef("Ellsworth in Beaverton")}
else {if (random(4, 6) =3D=3D 4)
{pictureRef("Ellsworth in Safford")}
else {if (random(5, 6) =3D=3D 5)
{pictureRef("Ellsworth in Douglas")}
else
{pictureRef("Ellsworth in Military")}
}}}}}
Instead of displaying a single, random image, all of the images were=
displayed at the same time. Before and after each image was a line of=
script, like this:
{if (random(1, 6) =3D=3D1)
{pictureRef(
the first image was displayed here
)}
else {if (random(2, 6) =3D=3D
{pictureRef(
the second image was displayed here.
)}
What am I doing wrong?
Scott
>Am Montag den, 16. Dezember 2002, um 19:11, schrieb Scott:
>>When the page that utilizes the random image script loads, it pre-loads=
all of the images in the array. This really slows down the loading of the p=
age.
>
>If you don't use JavaScript but UserTalk instead, you can use my little=
script for this reason (it's about randomly rotating banners but it works=
with simple pictures as well).
>
>See <http://DerSchockwellenreiter.editthispage.com/frontier/banner.html>=
(it's in German but I Thin the script is self-explanation).
>
>If you don't need a link behind the pciture you can ommit the second=
(glossRef) parameter.
>
>HTH (and excuse my bad (d)english)
>J"org (aka Der Schockwellenreiter)
>
>--
>J"org Kantel joerg@kantel.de
>Der Schockwellenreiter <http://www.schockwellenreiter.de/>
>Der Rollberg <http://rollberg.antville.org/>