Menu action not clearing screen display
ok, I have no more hair to pull out. My scalp is sore. So I thought I would ask the experts....
I have a menu (structured in the old fashion UL/LI fashion) that is being controlled by jquery. Initial item selection operates as advertised. But when a "user" selects another menu item, the screen (div) does not reinitalize and react to the click of the new item.
Here is my online site that I am working on.
In my menu, only the Chemical and Small Arms items are programmed. Here is the code that is controlling say "Bullet" (under Small Arms).
- $('#bullet').click(function() {
$('#searchResults').jqGrid({
url: 'weaponLib/AME_sa-bullet.xml',
datatype: 'xml',
colNames:["DODIC","NSN", "Size/Caliber", "Nomenclature"],
colModel:[
{name:"dodic",index:"dodic", xmlmap:"DODIC", width:30, align:"center", sorttype:"float"},
{name:"NSN",index:"NSN", xmlmap:"transData>NSN", width:40, align:"center"},
{name:"size", index:"size", xmlmap:"size",width:30, align:"center"},
{name:"nomenclature",index:"nomenclature", xmlmap:"nomenclature", width:120, align:"left"}
],
height:250,
width: 900,
viewrecords: true,
xmlReader: {
root : "smallArms",
row: "bullet",
repeatitems: false,
id: "[saId]"
},
rowNum: -1,
scroll: true,
altRows: true,
pager: 'gridNavBar',
caption: "Bullet Results"
});
$('#welcome').css('display', 'none');
$('#theGrid').css('display', 'block');
});
How do I make the div (searchResults) clear itself after the user clicks on another menu item (chemical for this example) before re-rendering the results grid??
Tony
It is not the job you get handed, but what you have done with it in the end that people remember.