ethereal1m's Profile User Rating: -----

Reputation: 3 Apprentice
Group:
Contributors
Active Posts:
214 (0.11 per day)
Joined:
30-June 09
Profile Views:
3,560
Last Active:
User is offline May 07 2014 08:51 PM
Currently:
Offline

Previous Fields

Dream Kudos:
50

Latest Visitors

Icon   ethereal1m has not set their status

Posts I've Made

  1. In Topic: Calling php code callback from ajax

    Posted 7 May 2014

    Dear all,
    thanks for all the help, it's been really helpful.

    regards
  2. In Topic: Calling php code callback from ajax

    Posted 6 May 2014

    @ArtificialSoldier
    I used the firebug net tab, under XHR GET dataRetrieval.php, it shows the callback return a value in asynchronous manner.

    Looks like the asynchronous aspect of Ajax, makes the caller misses the return from the callback. So the problem is fixed when I force the ajax to synchronous.

    So this gives me the next question, what is the bad side of having synchronous call? Any other alternative?
  3. In Topic: Calling php code callback from ajax

    Posted 5 May 2014

    @jack,
    I insert the following code to ajax call:
     error: function(request, status, error) {
                           alert(request.responseText);
                        }
    
    

    But that part of the code is not executed. I don't know why.

    @Dormilich,
    I changed my php code, in order to simplify, to:
     $a= $_GET['max_lat']+1;
    echo json_encode($a);
        exit();
    
    

    I got -5 for $a, but it didn't get passed back to the ajax portion.
  4. In Topic: Calling php code callback from ajax

    Posted 5 May 2014

    @ArtificialSoldie,
    json_encode prints a multi dimensional array. I use firebug to debug on the javascript side, seems the code didn't get into "success" nor "error" section meaning I don't get anything in return nor any error messages.

    @Dormilich,
    I change the POST method to get method and add the following line
     $a= $_GET['max_lat'];
    
    


    stepping through using xdebug, turns out the max_lat variable get passed. I don't want to manipulate this variable just yet making sure it get passed first, which it did, conforming the php code is called and processed correctly. Note that PDO has bindColumn method (see http://www.php.net/m...indcolumn.php).

    The PHP code is executed without problem, but seems the ajax code doesn't receive back from the PHP callback which I'm trying to figure out why.

    Any ideas?
  5. In Topic: Succinctly node.js

    Posted 2 May 2014

    thanks :^:

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

ethereal1m hasn't added any friends yet.

Comments

ethereal1m has no profile comments yet. Why not say hello?