script opnieuw uitvoeren 8x
groetjes jesse
Ik bedoel, verwacht je een antwoord zoals:
for($i = 0; $i < 8; $i++)
{
//zet hiertussen wat je 8 keer wil uitvoeren...
}
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.
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
moet er geen start event ofzo gedana worden zoals bij cookies ob_start
raar, kun je wat code geven? dan wordt het misschien duidelijker...
Geef eens een korte omschrijving dan wat dat stukkie script doet , des te beter je uitleg, des te beter ons antwoord ;-)
Code (php)
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
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;}
?>
$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;}
?>
Code (php)
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
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;}
}
?>
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
al geporbeert werkt dus niet.
Vaag... zo moet de lus geloof ik wel geïmplementeerd worden :/
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
EDIT:
Zijn alle popups hetzelfde?
Gewijzigd op 01/01/1970 01:00:00 door GaMer B
Idd ja :P elke keer als i verhoogd wordt komt er een popup tevoorschijn.. wat wil je eigenlijk met het script?
Code (php)
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
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;
}
?>
$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;
}
?>
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