Like Blair says, you need to use a callback.

I'd do something like this:


var seed_id;
var seed;

function createSeed(callback) {
  $.post('login/login.php',{action:'createseed'}, function(data) {
    results = data.split('|');
    seed_id = results[0];
    seed = results[1];
    if (callback) callback.call();
  });

}

createSeed(function() {
 alert(seed_id+"|"+seed);
});


That should give you the proper values in the alert.

Chris
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to