calling a block views by ajax I have a views with three displays which sorts comments of a node in newest, oldest and most popular order. These views are shown below the content and works with contextual filters. I have used ajax_comment and rate and vote api module in order to add/reply comments by ajax and let users vote other people's comments too. Now I want to load one of these views at a time so I have created an HTML like this:

&lt;select name="sort" onChange="return sort1()"&gt;
    &lt;option value="newest"&gt;newest comments&lt;/option&gt;
    &lt;option value="oldest"&gt;oldest commenst&lt;/option&gt;
    &lt;option value="popular"&gt;most popular comments&lt;/option&gt;
&lt;/select&gt;
&lt;div id="cm"&gt;&lt;/div&gt;


and a jquery code like this:

&lt;script&gt;
function sort1(){
$.ajax({
    url: Drupal.settings.basePath + '/views/ajax',
    type: 'post',
    data: {
        view_name: 'comments_views',
        view_display_id: 'block_2', //your display id
    },
    dataType: 'json',
    success: function(html){
        $('#cm').html(html);
    }
});
    return false;   
}
&lt;/script&gt; 


But it does not work.

I have tested quicktabs module too but comment reply link does not work with ajax_comment then. I have seen JQuery AJAX Load module too but it needs a url to load.

If my code is incorrect please correct it or if you have a better solution please let me know it.
I post my answer for anyone who is facing this problem. After all it worked by some changes:

&lt;div onclick="return sort1()"&gt;newest comments&lt;/div&gt;

&lt;div onclick="return sort2()"&gt;oldest commenst&lt;/div&gt;

&lt;div onclick="return sort3()"&gt;most popular comments&lt;/div&gt;
&lt;div id="cm"&gt;
     &lt;div id='news'&gt;&lt;?php print views_embed_view('comments_views', 'block_3'); ?&gt;




and jQuery code is:

function sort1(){
var nid='&lt;?php echo $node-&gt;nid; ?&gt;';    
$.ajax({
    url: 'http://www.yoursitename.com/views/ajax',
    type: 'post',
    data: {
        view_name: 'comments_views', //view name
        view_display_id: 'block_3', //view display
        view_args: nid,   //view contexuall filter
    },
    dataType: 'json',
    success: function(response){
        //alert(response[1].data);
        $('#cm').html(response[1].data);
    }
});
    return false;   
}


for each of the sort functions above it must be exist.