Loading a form via AJAX with drupal_get_form() I am trying to load a form via ajax, here is the code i use: 

JS:

bigPopupBut.click(function () {
        jQuery.ajax({
            url: "http://site/group_create",
            dataType: "html",
            success: function (data) {
                bigPopup.append(data);
            }
        });
})


The group_create is a PHP script that returns me a form, here is the code i used:

$node_type = 'group';
    $form_id = $node_type . '_node_form';     
    $node = new stdClass();
    $node-&gt;uid = $user-&gt;uid;
    $node-&gt;name = $user-&gt;name ;
    $node-&gt;field_city['und']['0']['value'] = $user-&gt;field_city['und']['0']['value'];
    $node-&gt;field_country['und']['0']['value'] = $user-&gt;field_country['und']['0']['value'];
    $node-&gt;type = $node_type;
    $node-&gt;language = LANGUAGE_NONE;
    $node-&gt;path = '';
    node_object_prepare($node);
    $return=drupal_get_form($form_id,$node);
return $return;


The Problem i have is that the PHP callback doesn't just return me the form, but a whole page, with headers, body, so when i append it with JS i get a duplicate of the whole page in my bigPopup DIV. 

What am i doing wrong ? how could i just get the form without the surounding page? 

Thanks all for the help.
Try just to do echo render($return); exit();.

Otherwise, you should change de delivery callback from the path of your page, and I'm pretty sure that exists one one Drupal for Ajax.