JavaScript Data is not going through the ajax code going through data too fast,going through data synonym,going

I'm using Facebook login feature & transferring some variables to other page through ajax. This particular ajax code isn't working, data is not going through. However I've other ajax code in other pages that works pretty good.

I'm not able to find the defect in the code.

Here is the code:

Page where ajax is called

<script type='text/javascript'>
window.fbAsyncInit = function() {
    FB.init({
        appId      : 'XXXXX',
        status     : false,
        cookie     : true,
        xfbml      : true
    });
}

function Login()
{
    FB.login(function(response) {
    if (response.authResponse) 
    {
        getUserInfo();
    }
    else 
    {
        console.log('User cancelled login or did not fully authorize.');
    }
    },{scope:'email,public_profile'});
}

function getUserInfo() {
    FB.api('/me/permissions', function(response) {
        var permission_response = JSON.stringify(response);
        var permissions = eval('('+permission_response+')');

        $.ajax({
            type: "POST",
            url: "/ajax_save_facebook_data.php",
            data: {permissions:permissions},
            success: function(option){
                alert(option); // Nothing coming here, blank alert
            }
        });

    });
}

AJAX Page

$permissions=$_POST['permissions'];
echo $permissions;

Anybody can help in this? I will really appreciate it.

Answer:1

I want to assign some properties to an array, but only if they are array indices. Otherwise some implementations might switch the underlying structure to a hash table and I don't want that. For ...

I want to assign some properties to an array, but only if they are array indices. Otherwise some implementations might switch the underlying structure to a hash table and I don't want that. For ...

  1. check property name javascript
  2. check property name
  3. check property name c#
  4. check property name js
  5. check property owner name
  6. check if property name exists javascript
  7. check object property name
  8. check property tax by name
  9. check property ownership by name
  10. property name check online
  11. c# check if property name exists
  12. javascript check object property name

Using loopback I need to get the modelName from a model instance. Any Ideas? var myAccount = new app.models.Account({name: 'ACME'}); var modelName = myAccount.modelName;` //should get 'Account'

Using loopback I need to get the modelName from a model instance. Any Ideas? var myAccount = new app.models.Account({name: 'ACME'}); var modelName = myAccount.modelName;` //should get 'Account'

I've got some GeoJson loading into an openlayers 3 vector layer var countriesLayer = new ol.layer.Vector({ source: new ol.source.Vector({ url: '/data/countriesandstates.geojson', format: ...

I've got some GeoJson loading into an openlayers 3 vector layer var countriesLayer = new ol.layer.Vector({ source: new ol.source.Vector({ url: '/data/countriesandstates.geojson', format: ...

  1. features geojson
  2. features geojson format
  3. features geojson polygon
  4. openlayers add features from geojson

When there is 10+ series in a Scatter plot for examples - Legend look really bad.. It just extends to bottom of the screen - crossing chart area etc. What it would be nice is to have a drop-down list ...

When there is 10+ series in a Scatter plot for examples - Legend look really bad.. It just extends to bottom of the screen - crossing chart area etc. What it would be nice is to have a drop-down list ...