Loading Homepage Randomly

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, [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

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


<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. :smiley:

@McGiver, i intentionally made that sign look blurry, lol
dont think i m gona use 3rd option myself, lets see :slight_smile:
I can send u that babe’s poster btw, 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 :slight_smile: 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

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

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.

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

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

You’re welcome!

You’ll have to change this one too:


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

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

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 :frowning:

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

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.

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