Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    CakePHP Ajax remoteTimer not working in Firefox

    Hi everybody,

    I am having trouble getting $ajax->remoteTimer working in Firefox. The following code works in Safari and Chrome (can't say about IE because I'm on a Mac!)

    In game.ctp (layout):
    PHP Code:
        echo $ajax->remoteTimer(array(
            
    "url" => array("controller" => "Game""action" => "getGameState"$game_id),
            
    "complete" => "processGame(request, json)",
            
    "frequency" => 1
        
    )); 
    In ajax.js:
    Code:
    function processGame(request, json){
    	alert("=)");
    }
    In game_controller.php:
    PHP Code:
        function getGameState($id){
            
        } 
    What am I doing wrong? Like I said, it works in Safari and Chrome, but NOT Firefox. And yes, getGameState() is supposed to be empty for now.

    Thanks!

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    I assume its the ajax your referring to here? If it works for some, and not others, its a deficiency in the AJAX / JS code itself; the only PHP that may be modifiable is the creation of the JS itself.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •