Click to See Complete Forum and Search --> : How can I make a Custom/Alternating welcome screen?


DanteAlighieri
11-27-2003, 06:45 PM
Hi!

While I was surfing the web I ran into quite an interesting website, namely of Compagnie Financière Richemont S.A. (http://www.richemont.com/). The welcome screen differs each time you reload the page. I am quite curious how this is achieved.

I wasn't able to detect a script or code in the HTML. Therefore I believe a different method must be used. I would greatly appreciate it if someone could tell me how to program such a feature!

Thanks.

Dante

:confused:

PeOfEo
11-27-2003, 06:53 PM
it was done with server side scripting.

96turnerri
11-27-2003, 06:54 PM
<script type="text/javascript">
var myimages=new Array()

function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

preloadimages("../images/home/copyright_2002_richemont_home<? echo $iRandom ?>_thebrands_on.gif","../images/home/copyright_2002_richemont_home<?echo $iRandom?>_investorinfo_on.gif","../images/home/copyright_2002_richemont_home<?echo $iRandom?>_companyprofile_on.gif","../images/home/copyright_2002_richemont_home<?echo $iRandom?>_careers_on.gif","../images/home/copyright_2002_richemont_home<?echo $iRandom?>_contact_on.gif","../images/copyright_2002_richemont_arrow_on.gif")

function goUrl(Selected) {
var newURL = Selected.options[Selected.selectedIndex].value ;
if (newURL!=" ") {
document.location.href = newURL;
}
}
</script>

contains PHP

96

DanteAlighieri
11-27-2003, 07:05 PM
Thanks for the quick replies. I see your point. Is there a way I can reproduce this when my server supports .php? If so, could you shortly point out what I should do?

Thanks.
Dante

:rolleyes:

PeOfEo
11-27-2003, 08:43 PM
those code above should do it. You can make a random image script that is executed on the server side and the normal html is outputted. Id write something but I don't use php. I use asp.net

DanteAlighieri
11-28-2003, 04:33 AM
Ok! Thanks for your help! I will take my thread to the php forum. I am sure someone can help with the script there! But now I at least now what to do!:)

96turnerri
11-28-2003, 04:42 AM
thats what i was going to suggest posting in the php forum, gl on that, you welcome for the help