script opnieuw uitvoeren 8x

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Jesse Degger

Jesse Degger

28/02/2007 19:27:00
Quote Anchor link
ik wil mijn script presies 8x opnieuw uitvoeren. hoe doe ik dit?

groetjes jesse
 
PHP hulp

PHP hulp

30/04/2024 10:50:51
 
Baarr

Baarr

28/02/2007 19:30:00
Quote Anchor link
Kun je wat verder specificeren ?

Ik bedoel, verwacht je een antwoord zoals:

for($i = 0; $i < 8; $i++)
{
//zet hiertussen wat je 8 keer wil uitvoeren...
}
 
Axel de Mol

Axel de Mol

28/02/2007 19:30:00
Quote Anchor link
misschien heb je wat meer informatie, anders zou ik gewoon zeggen. Gebruik een lus

net te laat :P
Gewijzigd op 01/01/1970 01:00:00 door Axel de Mol
 
Jesse Degger

Jesse Degger

28/02/2007 19:31:00
Quote Anchor link
ik heb een script dat een actie moet maken, dit wil ik 8x laten doen zonder dat ik 8x de functie onder elkaar moet scrhijven ik hoop dat jullie me snappen. TnQu.
 
Axel de Mol

Axel de Mol

28/02/2007 19:33:00
Quote Anchor link
Nukey geeft een goede uitleg hoe het moet. Gewoon een for loop gebruiken en daar je script in zetten.

for($i = 0; $i < 8; $i++)

wat hij dus doet is een variabele i aanmaken. die is nul. elke keer als de for loop doorlopen wordt (jouw script) wordt de variabele i met 1 opgehoogd. Wanneer hij 8x uit gevoerd is stopt de loop...

hoop dat het wat duidelijker is.
Gewijzigd op 01/01/1970 01:00:00 door Axel de Mol
 
Jesse Degger

Jesse Degger

28/02/2007 19:34:00
Quote Anchor link
dat werkt niet, nu voert hij het helemaal niet uit?

moet er geen start event ofzo gedana worden zoals bij cookies ob_start
 
Axel de Mol

Axel de Mol

28/02/2007 19:35:00
Quote Anchor link
raar, kun je wat code geven? dan wordt het misschien duidelijker...
 
Baarr

Baarr

28/02/2007 19:37:00
Quote Anchor link
Geef eens een korte omschrijving dan wat dat stukkie script doet , des te beter je uitleg, des te beter ons antwoord ;-)
 
Jesse Degger

Jesse Degger

28/02/2007 19:39:00
Quote Anchor link
dit script stukje staat midden in me script en moet dus 8x uitgevoerd worden:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?
$count
+1;
if($count==2)
{

$draw="popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://hetvaagspel.jessed.nl')\"><br></body>"
;
}

if($count==3)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://jessed.nl/chat/')\"><br></body>"
;
}

if($count==4)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://jessed.nl/forum')\"><br></body>"
;
}

if($count==5)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://mylife.jessed.nl')\"><br></body>"
;
}

if($count==6)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://valentijn.jessed.nl')\"><br></body>"
;
}

if($count==7)
{

$draw="popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://hetvaagspel.jessed.nl')\"><br></body>"
;
}

if($count==8)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://wanhoop.jessed.nl')\"><br></body>"
;
}

if(isset($_COOKIE['o_" . $count . "'])){ echo $draw;}
?>
 
GaMer B

GaMer B

28/02/2007 19:48:00
Quote Anchor link
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
for($i = 0; $i < 8; $i++)
{

if($i==2)
{

$draw="popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://hetvaagspel.jessed.nl')\"><br></body>"
;
}

if($i==3)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://jessed.nl/chat/')\"><br></body>"
;
}

if($i==4)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://jessed.nl/forum')\"><br></body>"
;
}

if($i==5)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://mylife.jessed.nl')\"><br></body>"
;
}

if($i==6)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://valentijn.jessed.nl')\"><br></body>"
;
}

if($i==7)
{

$draw="popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://hetvaagspel.jessed.nl')\"><br></body>"
;
}

if($i==8)
{

$draw="<body>popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =

day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',

'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY

onLoad=\"javascript:popUp('http://wanhoop.jessed.nl')\"><br></body>"
;
}

if(isset($_COOKIE['o_" . $count . "'])){ echo $draw;}
}

?>


Niet getest
 
Jesse Degger

Jesse Degger

28/02/2007 19:50:00
Quote Anchor link
al geporbeert werkt dus niet.
 
Axel de Mol

Axel de Mol

28/02/2007 19:53:00
Quote Anchor link
Vaag... zo moet de lus geloof ik wel geïmplementeerd worden :/
 
GaMer B

GaMer B

28/02/2007 19:54:00
Quote Anchor link
jesse schreef op 28.02.2007 19:50:
al geporbeert werkt dus niet.


Waarom zou je uberhaubt dit in een lus willen zetten :P Das nogal irri als je 8 7 popups in nog geen 1½ seconde op je beeldscherm ziet komen...

EDIT:

Zijn alle popups hetzelfde?
Gewijzigd op 01/01/1970 01:00:00 door GaMer B
 
Axel de Mol

Axel de Mol

28/02/2007 19:55:00
Quote Anchor link
Idd ja :P elke keer als i verhoogd wordt komt er een popup tevoorschijn.. wat wil je eigenlijk met het script?
 
Baarr

Baarr

28/02/2007 19:57:00
Quote Anchor link
Zou je het niet ongeveer zo willen doen ? Let op, niet exacte code die je meteen kunt gebruiken, maar je snapt het idee, verder kan de implementatie van hetgeen je wilt bereiken toch wel makkelijker, maar daar ga ik me ff niet in verdiepen ;-) Ik heb het verder ook niet getest of wat dan ook.

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

$draw
= '';
$jsLink = array(2 => 'http://hetvaagspel.jessed.nl',
                3 => 'http://jessed.nl/chat/',
                4 => 'http://jessed.nl/forum',
                5 => 'http://mylife.jessed.nl',
                6 => 'http://valentijn.jessed.nl',
                7 => 'http://hetvaagspel.jessed.nl',
                8 => 'http://wanhoop.jessed.nl');
                
foreach ($jsLink as $key => $link)
{

    if($count == $key)
    {

        $draw ="popUp(this.href,'fixed',400,400);return false;<SCRIPT LANGUAGE=\"JavaScript\">function popUp(URL) {day = new Date();id =
    
        day.getTime();eval(\"page\" + id + \" = window.open(URL, '\" + id + \"',
        
        'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1152,height=864');\");}</script><BODY
        
        onLoad=\"javascript:popUp('"
. $link . "')\"><br></body>";
    }
}



if(isset($_COOKIE['o_" . $count . "']))
{

    echo $draw;
}


?>
 
Jesse Degger

Jesse Degger

28/02/2007 20:11:00
Quote Anchor link
kben nog niet goed genoeg in php om die tesnappen maar als ik het zo gebruik werkt het niet.. :S

verder is het een keuze om deze pop-ups teopenen. je kan via een opties menu dat wel werkt kiezen welke sub-pagina je vn mijn site wilt openen
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.