This is incredibly frustrating...OK, so I try two other strategies, as seen in your post and on the forum:
#1: I try to change the name of a menu item, based on a function written by "Kevin" I think:
Code: Select all
function mm_changeItemProperty(menuName, itemName, codeRef, newValue, updateDisplay)
{
menuName = menuName.toLowerCase();
for (i=0; i<_mi.length; i++)
if (_mi[i][1].replace(/\ \;/ig,' ') == itemName && _m[_mi[i][0]][1] == menuName) break;
if (i == _mi.length) {
alert("Could not find menu");
return;
}
_mi[i][codeRef] = newValue;
if (updateDisplay) BDMenu(_mi[i][0]);
}
With my menu in menu_data.js:
Code: Select all
with(milonic=new menuname("userMenu")){
alwaysvisible=1;
screenposition="left";
left="offset=320";
orientation="horizontal";
style=rightStyle;
top=89;
aI("text=uname");
}
I make this call:
Code: Select all
userName = xmlDoc.getElementsByTagName('user_name')[0].childNodes[0].nodeValue;
mm_changeItemProperty("userMenu", "uname", 1, userName, 1);
And get this error:
_mi[1] has no properties
Can't remember JS scope but perhaps the "i" variable went out of scope, not sure.
#2: Based upon your suggestion in this page:
http://milonic.com/createmenu.htm
and in the sample found in the release I just bought, I tried this:
Code: Select all
with(milonic=new menuname("uname")){
alwaysvisible=1;
screenposition="left";
left="offset=500";
orientation="horizontal";
style=rightStyle;
top=89;
aI("text="+userName+";url=;");
}
mm_createNewMenus();
popup("uname",1);
And I get an error message telling me that:
Error: "_wid" is undefied.
This also happens in the sample that you ship out!!! (In the dynamic_menus_API folder, the index.html gets the same problem, in both IE and FF).
I just bought Milonic, I assume that I'm on the latest version, so what's the deal here?
It appears that _wid is defiend in mmenusns4.js, which is fine if you're on NS4, but I couldn't find it defined anywhere else (i.e mmenudom.js)! Either I'm making some serious newbie error or your QA is sloppy!