PDA

View Full Version : "YAHOO.util.Connect has no properties"


byuva
09-30-2006, 03:50 PM
I am trying to load from an XML file and am not using the paging functionality. Here is a small excerpt of the relevant code:

//------------------------------
var dataModel = new YAHOO.ext.grid.XMLDataModel({
tagName: 'Document',
totalTag: 'TotalCount',
id: 'doc_id',
fields: ['filename', 'md5']
});
dataModel.load('/yui');

//-------------------------------

According to Firebug I get

YAHOO.util.Connect has no properties at yui-ext.js line 291.

Any thoughts on what the problem could be? The xml seems to be served up from /yui correctly. I am a bit new to Javascript so my apologies if I am missing something obvious.

-b

jack.slocum
09-30-2006, 08:20 PM
YAHOO.util.Connect is defined in connection.js of the Yahoo! UI download.

Jack

byuva
10-01-2006, 05:06 PM
Thanks Jack, brain freeze on my part. I wish Javascript could import its own dependencies :-)

-b

jack.slocum
10-01-2006, 05:33 PM
Sure would be nice wouldn't it?