I know that many topics exist about that, but I didn't find a solution to my issue. I make an AJAX request, and I'd like to parse the result, and inject it in a table in my page.
$.ajax( {
type : "GET",
url : "http://keyserver.gingerbear.net/pks/lookup?",
data : "search=john.smith@gmail.com&fingerprint=on&op=index",
dataType: "html",
success : function(resultat){
$(resultat).ready(function() {
$('pre',$(resultat).html()).each(function(){
var htmlString = $(this).html();
console.log("Key ID : "+/0x[a-z0-9]{16}/i.exec(htmlString));
console.log("User : "+$(this).find('a:eq(1)').text());
console.log("Bits : "+/[0-9]{4}[RD]/.exec(htmlString));
console.log("Data : "+/[0-9]{4}-[0-9]{2}-[0-9]{2}/.exec(htmlString));
console.log("Fingerprint : "+/Fingerprint=(.*)/.exec(htmlString));
});
});
},
// Blabla
} );
I saw here the beginning of a solution. For example I can do console.log($(resultat).find('a')) and I have the content of the first , but console.log($(resultat).find('pre')) doesn't work...