[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Random pagina's
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Random pagina's

Het echte opmaakwerk, alles vragen over HTMLen, CSSen en Javascripten.

Random pagina's

Berichtdoor Juvabu » 19 feb 2006 12:31

Wie kan mij helpen of weet waar ik een soort script kan vinden om op mijn site bij ieder bezoek een andere pagina te laten zien.
Ik werk zelf met 4 frames, maar wil op de main page bij reload de pagina veranderen.
Aangezien het een adult page is en ik niet weet of er hier ook kinderen komen wil ik mijn link hier niet neer zetten.
Mocht je mij toch willen helpen dan zie ik wel een berichtje in mijn berichtenbox.
Eventueel kun je mijn mail adres hier ook toevoegen op msn, ik ben vrij veel online.

Groetjes Dick
Juvabu
 

Re: Random pagina's

Berichtdoor KillerSponge » 19 feb 2006 12:50

Dat is niet zo moeilijk denk ik. In PHP heb ik al ns zoiets gemaakt, in javascript ben ik geen meester, dus... ^^
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Random pagina's

Berichtdoor Juvabu » 19 feb 2006 13:11

Het probleem hier is dat ik een stuk ruimte heb gehuurt voor 5 jaar, echter zij ondersteunen geen php.
Dus dat is mijn probleem.
Juvabu
 

Re: Random pagina's

Berichtdoor KillerSponge » 19 feb 2006 13:51

Hm ja... met javascript kan het wel... Ns ff kijken of dit me lukt.

[code="javascript"]<SCRIPT LANGUAGE="JavaScript">

index = Math.floor(Math.random() * 4);
location.href=index+".html";

</SCRIPT>[/code]

Die 4 moet je dan veranderen in het aantal pagina's die meedoen aan de random. Vervolgens noem je de verschillende pagina's 0.html, 1.html enz.
Het is niet de meest nette oplossing, maar het werkt wel ^^
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Random pagina's

Berichtdoor Juvabu » 19 feb 2006 15:15

Dat gaat me wel lukken denk ik, maar zet ik dit op mijn mainpage ??
En wordt dan zeg maar de pagina die ik wil laten tonen ook getoont op de mainpage ??
En staat er niks verder nadat ik mijn head heb afgesloten ?

Ga der wel ff mee spelen, mocht het niet lukken dan zie ik later wel wat er fout ging bij mij Laughing
Juvabu
 

Re: Random pagina's

Berichtdoor KillerSponge » 19 feb 2006 15:16

Volgens mij is het mogelijk dit in een pagina te zetten, bv. random.html, en die vervolgens in het frame te zetten die random moet. Weet ik niet helemaal zeker ^^
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Random pagina's

Berichtdoor Juvabu » 19 feb 2006 15:30

Als ik het volgende stukje schrijf en de pagina open werkt er wel wat, echter hij blijft steeds main4 openen.
vooruitgang aanwezig, Very Happy

<HTML>
<HEAD>
<TITLE>Randompage</TITLE>

<SCRIPT LANGUAGE="JavaScript">

index = Math.floor(Math.random() * 4);
location.href="main1.html";
location.href="main2.html";
location.href="main3.html";
location.href="main4.html";

</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>

Eerlijk gezegt denk ik dat ik nog wat mis, ga weer verder klooien, mocht het lukken dan zal ik het hier wel even posten, denk dat ik niet de enige ben die dit gebruiken kan.
Juvabu
 

Re: Random pagina's

Berichtdoor KillerSponge » 19 feb 2006 15:32

Ja, dat klopt. Je moet er dit van maken:

[code="javascript"]<HTML>
<HEAD>
<TITLE>Randompage</TITLE>

<SCRIPT LANGUAGE="JavaScript">

index = Math.floor(Math.random() * 4);
location.href=index+".html";

</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
[/code]
en vervolgens noem je main 1 tm 4 gewoon 1.html, 2.html, 3.html, 4.html. Smile
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Random pagina's

Berichtdoor Juvabu » 19 feb 2006 15:43

Ik geloof dat het werkt, ga even proberen hoe het werkt als ik het op de site zelf verwerk, ik heb in ieder geval al diverse pagina's voorbij zien komen.

Nu hopen dat het ook werkt in mijn site bestaande uit 4 frames, als dat gelukt is kan ik de dingen die op elke pagina zichtbaar moeten zijn via vaste iframes zichtbaar maken.
Ben dan wel geen wizkid ( Embarassed 41 ) maar hoe dat werkt weet ik wel Laughing
Juvabu
 


Keer terug naar HTML, CSS, Javascript



cron