TurboGears 2.3.1 on Linux:
class MyGrid( jqGridWidget ):
id = "mygrid"
options = {
"pager" : "mygridpager",
"url" : "/myData",
"mtype" : "GET",
"rowList" : [25,50,100,250],
"datatype" : "json",
"colNames" : [ "ID", "timestamp", "message" ]
}
def prepare( self ):
self.resources.append( word_wrap_css )
super( MyGrid, self ).prepare()
My dictionary returned from my controller has:
dict( form=MyGrid )
My template has:
${form().display()}
Which renders:
<table id="mygrid"></table><div id="mygridpager"></div><script
type="text/javascript">$(document).ready( function(){ var opts =
{"rowList": [25, 50, 100, 250], "url": "/myData", "mtype": "GET", "datatype":
"json", "colNames": ["ID", "timestamp", "message"], "pager": "mygridpager"};
var grid = $("#mygrid"); *grid.jqGrid(opts);* if ( 'pager' in
opts ) { opts['pager_selector'] = opts['pager'];
opts['pager'] = $(opts['pager']) var pager_opts = {} var
prmEdit = {}; var prmAdd = {}; var prmDel = {};
var prmSearch = {}; var prmView = {};
grid.navGrid('#'+opts['pager_selector'], pager_opts,
prmEdit, prmAdd, prmDel, prmSearch, prmView) ; }
});</script></div>
Firefox reports:
TypeError: grid.jqGrid is not a function
grid.jqGrid(opts);
I made bold the line which generates the error.
The "myData" URL is never fetched.
>From what I can tell, ToscaWidgets is rendering it correctly, however,
Firefox certainly doesn't like it. Any ideas?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/groups/opt_out.