I am trying to retrieve some information about any given webpage (namely the of the page and the of the domain) and then make a jquery asynchronous POST with the retrieved information. Unfortunately, the javascript execution reaches the $.post(), but never makes the actual web request. Here is my code:
$.get('../embed', {u: url}, function(html) {
alert('got "' + html + '"');
$.post('/media/add', { story: storyid, caption: caption, type: 5, title: title, content: html, meta: meta }, function(data) {
var obj = jQuery.parseJSON(data);
var thumb = imageUrlFromMedia(obj);
var clip = addToClipboard(obj.id, thumb || '/img/icons/embedly.png', obj.name);
});
});
Is it even possible to make another ajax call in the success handler of $.get()? Has anyone here had any success with multiple chained HttpRequests before?