I’ve created a grid on the fly based off a select box. The xmlData comes in the innerHTML of a hidden div pulled from an AJAX call (because I need to dynamically load column data, I had to include several divs containing the data I need.
Below is the javascript used in the page:
$(document).ready(
function() {
$('select#title').change(
function() {
var valu = this.value;
$.post(
'audit2/formLoader',
{vector: valu, progress: 'title'},
function (data) {
//alert(data);
$('div#resultsDiv').html(data);
if(valu != "NEW") loadGrid(valu);
}
)
}
)
}
);
function loadGrid(valu) {
alert(valu);
$.post(
'audit2/formLoader',
{vector: valu, progress: 'grid'},
function (data) {
alert(data);
$('#grid').html(data);
loadChart();
}
)
}
function loadChart() {
alert($("#list").setGridParam);
if($("#list").setGridParam){
$("#list").setGridParam(
{
datastr:$("#xmlData").html(),
colNames: eval("[" + $("#colNames").html() + "]"),
colModel: eval("[" + $("#colModel").html() + "]"),
pager: $('#pager'),
rowNum:25,
rowList:[10,25,50],
multiSelect: true,
viewrecords: true,
imgpath: '/incs/themes/sand/images',
caption: $("#caption").html()
}
);
$("#list").trigger("reloadGrid");
} else {
jQuery("#list").jqGrid({
datastr:$("#xmlData").html(),
colNames: eval("[" + $("#colNames").html() + "]"),
colModel: eval("[" + $("#colModel").html() + "]"),
pager: $('#pager'),
rowNum:25,
rowList:[10,25,50],
multiSelect: true,
viewrecords: true,
imgpath: '/incs/themes/sand/images',
caption: $("#caption").html()
});
}
alert("Hello" + eval("[" + $("#colNames").html() + "]"));
//$("#hideshow").removeClass("hidden");
}
Below is the html included in the page on initial load.
This is example data loaded into the “grid” div:
25144501447514410014412514416The language used in ads clearly communicates the program offer in a manner likely to be understood by the target market417All ads, when applicable, disclose clearly in the audio and visual that the program incurs a premium charge, the actual charge, and the fact that standard messaging fees also apply418The term "Free" is used only when no fees are associated with the program420All ads disclose clearly the subscription term, billing interval, and billing method (i.e., wireless phone bill or prepaid balance deduction)421All ads disclose clearly the method for canceling the program and advise subscribers that they may cancel anytime422All ads cite a resource, such as a Website or a toll-free number, where users can reference the program T&Cs42All ads and promos must clearly state that a service is a recurring subscription and the subscription term is clearly stated (daily or monthly only)43All ads and promo must provide a clear explanation between multiple services on single short code and/or clear delineation between said services44Advertising material does not misrepresent VZW's participation in a program or misuses VZW logos (should be VerizonWireless not Verizon)45A substitute Program is being offered to Verizon Wireless subscribers46Mention that Standard/other charges may apply47All terms and conditions must be clearly communicated48The ad does not include an option to also buy from a credit card49Ads should not imply that unapproved content will be available 41The Program Advertised matches the program description in the CA410Opt-out info is clearly displayed in all ad, promo and help material; the word Stop should appear in advertising and promo materials411Services may not be advertised as free if reasonable usage incurs premium fees412Subscriber shall be informed that charges will appear on their wireless bill, or be deducted from their prepaid balance413Pricing is clearly and conspicuously stated414Advertising and placement shall not be deceptive about functions, features or content415The service must disclose if human operators are employed to participate in chat419All ads disclose clearly in the audio and visual that the subscriber must be age 18 or older or have a parent's permission to participate423Pricing Clearly Stated424I will blow your mind4
"Selected","Test ID","Test","Severity"
{name:"selected",index:"selected",width:50},{name:"id",index:"id",width:50},{name:"test",index:"test",width:300},{name:"severity",index:"severity",width:100,editable:true,edittype:"select",editoptions:"1:1;2:2;3:3;4:4"}
Every time I load it, the column names come up but the data is blank. In addition, the reloadGrid event does not exist.
I’ve been working on this since last week, and I’m really at a loss. I’ve traced it in firebug many times over and still have no clue.
Any advice?
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top