1

I'm using post, and the YUI documentation example code isn't working.

YAHOO.util.Event.addListener(window,"load",function()
{

    var columnDefs = 
    [ 
        {key:"url", sortable:true, resizeable:true}, 
        {key:"title", sortable:true, resizeable:true}, 
        {key:"count", sortable:true, resizeable:true} 
    ];

    this.dataSource = new YAHOO.util.DataSource("/getallsites/");
    this.dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
    this.dataSource.connMethodPost = true;
    this.dataSource.responseSchema = 
    {
        fields:["url","title","count"]    
    };

    this.myDataTable = new YAHOO.widget.DataTable("siteTable",columnDefs,this.dataSource,
        {initialRequest:"/getallsites/"});


});

The /getallsites/ returns a JSARRAY. I wanted to get the JSARRAY to work before I converted it to JSON. The Django server log isn't even recognizing a request to /getallsites/. Any ideas?

Thanks!

FinDev
  • 4,437
  • 6
  • 29
  • 29

1 Answers1

1

First, make sure you are including the Connection Manager utility on the page.

Second, the way you have it configured, the request will go to /getallsites//getallsites/, so try setting initialRequest to "".

Jenny Donnelly
  • 412
  • 2
  • 4