I have a tree menu generated from a Python script that is giving me
problems. When I run the script I get the following two errors in
Firefox's JavaScript Console:
Error: this.items[this.items.length - 1].makeSubmenu is not a function
Source File:
file:///E:/Audit/reports/mtmcode.js
Line: 50
Error: thisURL has no properties
Source File:
file:///E:/Audit/reports/mtmcode.js
Line: 200
I haven't edited the mtmcode.js file from the original, so I think
this has to do with my code.html file. Which is the only thing I have
modified.
I can post the contents of code.html, but it is a lot of JavaScript.
Does anyone know how to isolate this some? Here are some of the lines
starting where my program made changes:
-- Begin --
// Main menu.
var menu = null;
menu = new MTMenu();
var hosts = null;
hosts = new MTMenu();
menu.addItem(hosts);
var scans = null;
scans = new MTMenu();
menu.makeLastSubmenu(scans);
var category = null;
category = new MTMenu();
menu.makeLastSubmenu(category);
var tIP = btoa('ip-10.1.10.81');
var tIP = null;
tIP = new MTMenu();
menu.addItem(tIP);
menu.makeLastSubmenu(tIP);
tIP.addItem(reg_accessDrives);
var reg_accessDrives = null;
reg_accessDrives = new MTMenu();
tIP.makeLastSubmenu(reg_accessDrives);
reg_accessDrives.addItem('ClearPageFileAtShutdown',
'10.1.10.81-reg_accessDrives-ClearPageFileAtShutdown');
reg_accessDrives.addItem('restrictanonymous',
'10.1.10.81-reg_accessDrives-restrictanonymous');
reg_accessDrives.addItem('ShutdownWithoutLogon',
'10.1.10.81-reg_accessDrives-ShutdownWithoutLogon');
-- End --
tIP is dynamically created in Python to get around the JavaScript
variable having a name with periods. I don't know if it is the best
way, but for now there are no longer any errors from that code.
The lines like "10.1.10.81-reg_accessDrives-ClearPageFileAtShutdown"
are place holders until I get further along. I have also tried making
them look like URLs, which didn't work either.
Any thoughts on where I should go next?
Thanks for any help,
Wayne