# Loading Homepage Randomly

**URL:** <https://forum.kirupa.com/t/loading-homepage-randomly/65357>\
**Category:** random\
**Created:** [September 25, 2004, 1:37pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357 "2004-09-25T13:37:42Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasninder](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@Jasninder](https://forum.kirupa.com/u/Jasninder)\
**Post date:** [September 25, 2004, 1:37pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/1 "2004-09-25T13:37:42Z")

</div>

I have a set of 3 splash pages rightnow but i am thinking of making 10 and load them randomly whenever page is refreshed or a person visits the link, I know its possible as i have seen it on [teamphotoshop.com](http://teamphotoshop.com), [size=1][color=silver]they dont have it anymore[size=2][color=black] Does anyone know how to do that, i know its some java script but i cant find it anywhere.[/color][/size][/color][/size]

just a rough design as none of them are final rightnow, its my readymade garment showroom website, we are opening one branch in uk very soon too…

Best Regards  
Jas

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 2:01pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/2 "2004-09-25T14:01:33Z")

</div>

where did you get the babe from splash1 from :drool:

looks good but you were looking for critics weren’t you?!

I think the sign (the blurred red part) could get a workover

plus several smaller things:  
you could make the sign sharp and the people in the back a little blurred (like the motion blur in pic one or some gaussian blur) so that the sign is kind of “in the focus” of the camera while the rest of the image is in the back.

splash3 doesn’t really fit to the sign. maybe you should adjust it to the drawing

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 2:33pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/3 "2004-09-25T14:33:59Z")

</div>

```auto

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- 
var howMany = 2; // max number of items listed below
var page = new Array(howMany+1);

page[0]="first-random-page.html";
page[1]="second-random-page.html";
page[2]="third-random-page.html";

function rndnumber(){
var randscript = -1;
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
}
return randscript;
}
quo = rndnumber();
quox = page[quo];
window.location=(quox);
 -->
</SCRIPT>
</HEAD>

```

That should do. 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 2:55pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/4 "2004-09-25T14:55:20Z")

</div>

@McGiver, i intentionally made that sign look blurry, lol  
dont think i m gona use 3rd option myself, lets see 🙂  
I can send u that babe’s poster btw, [emailme@jasninder.com](mailto:emailme@jasninder.com) n i ll reply wid the pic…i got it from some site…dunno where hehehe

@iregambler, I just got it working 🙂 so when i want to add more pages do i just edit

> 

page[0]=“1.html”;  
page[1]=“2.html”;  
page[2]=“3.html”;

this part?  
and just add more pages?

> 

page[0]=“1.html”;  
page[1]=“2.html”;  
page[2]=“3.html”;  
page[3]=“4.html”;  
page[4]=“5.html”;  
page[5]=“6.html”; and so on…

=) thanks a ton man, really appriciate it.

Cheers  
Jas

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 3:05pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/5 "2004-09-25T15:05:49Z")

</div>

oh, so it’s not an image you have the full rights of? ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 3:06pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/6 "2004-09-25T15:06:55Z")

</div>

http://[www.jasninder.com/splash.zip](http://www.jasninder.com/splash.zip)

download and see how pic dont loads in dead center, i know i m makin some stupid small mistake but my mind is so stuck rightnow that i cant figureout what it is, it should load in center, its not doing that.

dont feel the difference? press f5 key and see how it comes back to its orignal place.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 3:08pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/7 "2004-09-25T15:08:49Z")

</div>

hey its a royalty free image, somesite gave it out as wallpapers…is that illegal?:-s  
if it is i ll take her off 🙂 but hey nothin bad in havin her at ur desktop is it?😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 3:22pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/8 "2004-09-25T15:22:05Z")

</div>

to avoid stupid questions by girlfriends I switched to sexfree desktop themes some time ago 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 4:21pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/9 "2004-09-25T16:21:52Z")

</div>

You’re welcome!

> [@Jasninder](#):
>
> @iregambler, I just got it working 🙂 so when i want to add more pages do i just edit  
> …  
> …  
> …  
> this part?  
> and just add more pages?

You’ll have to change this one too:

```auto

var howMany = [color=red]2[/color];
 
 

```

Change it to the number of random pages you want to have.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 4:28pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/10 "2004-09-25T16:28:40Z")

</div>

but its somehow taking the center pic off to a bit of left and on top, on refresh it comes on its orignal position.Download the zip file you will see ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 5:16pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/11 "2004-09-25T17:16:28Z")

</div>

even if they let you download the image as a wallpaper or whatever, it dosent mean they’re royalty free ;). I would e-mail the guy and ask permission :).

CHeers!  
3dnirvana

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 25, 2004, 5:21pm UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/12 "2004-09-25T17:21:04Z")

</div>

Kill the margin stuff in your body-tag and it will work.  
(Don’t know why, but it does for me :D)

I fixed that in the files attached to this post.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 26, 2004, 1:07am UTC](https://forum.kirupa.com/t/loading-homepage-randomly/65357/13 "2004-09-26T01:07:29Z")

</div>

No Nirvana, i am not using that pic…i usually buy my pics from getty images or imagestate so why not now…

firegambler  
thanks again buddy, u’v been a great help here, GOD Bless

Cheers  
Jas
