Array met ajax

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Manaus

Manaus

13/10/2008 20:32:00
Quote Anchor link
IK heb volgende script:
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
<?php
include('config.php');
/**
 * @author Manaus
 * @copyright 2008
 */

$user->sRoom($_GET['id']);

for($i = 1; $i<11; $i++){
    if($user->cPlace($i)){
    
    }

    else{
        echo '$(\''.$i.'\').innerHTML = "<img src=images/vrij.png>"; ';
        
    }
}




?>

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
<?php
        
                echo'
                
                var url = \'http://poker.manauslavens.com/getinfo.php\';
                var periodical, dummy
                var shit;
            
            
                /* our ajax istance */
                var ajax = new Ajax(url, {
                    update: shit,
                    method: \'get\',
                    onComplete: function() {
                        eval(shit);
                    },
                    onCancel: function() {
                        
                        
                    }
                });
            
                
            var refresh = (function() {
                // dummy to prevent caching of php
                dummy = $time() + $random(0, 100) + "=1&room='
.$_GET['id'].'";
                // we add out fancy spinner
                // requests of our php plus dummy as query
                ajax.request(dummy);
            });    
            
            periodical = refresh.periodical(timer, this);
            ajax.request($time() + "=1&room='
.$_GET['id'].'");
        '
;
                
            
        ?>

Alles blijft gewoon leeg, wat is er fout aan die eval?
mvg, manaus
Gewijzigd op 01/01/1970 01:00:00 door Manaus
 
Er zijn nog geen reacties op dit bericht.



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.