Alternative
Using Prototype Framework:

new Ajax.Updater('products', '/some_url', {
  method: 'get',
  insertion: Insertion.Top,
    onSuccess: function(transport){
      var response = transport.responseText;
      alert("Success! \n\n" + response);
    },
    onFailure: function(){ alert('Something went wrong...') }

  });
 
13