Dom Menu + Prototype.js

34 views
Skip to first unread message

RenardDesMers

unread,
May 10, 2007, 12:00:59 PM5/10/07
to DOM Menu Library
Hi !
I try to make prototype.js work with DomMenu, I changed all "Hash"
calls to "Hash_DomLib" but I still have errors saying Hash_Domlib is
not defined. Did I miss something ? Is there something else I should
do ?

RenardDesMers

unread,
May 11, 2007, 4:53:53 AM5/11/07
to DOM Menu Library
Seems I messed up.
Works ok now

traigo

unread,
May 11, 2007, 8:52:40 PM5/11/07
to DOM Menu Library
I am having similar issues, but my error is 'Hash is not a
constructor'. What was the mess up? I have it working in 2
locations. One works with prototype and the other doesn't.

My menu items. They work as long as I don't have prototoype.js on the
page.

domMenu_data.set('domMenu_main', new Hash(
1, new Hash(
'contents', 'Personal',
1, new Hash(
'contents', 'Details',
'uri', 'ViewEmployee.action'
),
2, new Hash(
'contents', 'Dependents',
'uri', 'ViewDependents.action'
),
3, new Hash(
'contents', 'Emergency Contacts',
'uri', 'EmployeeEmergency.action'
)
),
2, new Hash(
'contents', 'Payroll',
1, new Hash(
'contents', 'Current',
'uri', 'EmployeePayroll.action'
),
2, new Hash(
'contents', 'Yearly Summary',
'uri', 'EmployeeCheckStubYear.action'
),
3, new Hash(
'contents', 'Check Stubs',
'uri', 'EmployeeCheckStubCheck.action'
),
4, new Hash(
'contents', 'Past Timepunches',
'uri', 'EmployeePunches.action'
)
),
3, new Hash(
'contents', 'Benefits',
'uri', '',
1, new Hash(
'contents', 'Enrolled',
'uri', 'EmployeeBenefit.action'
),
2, new Hash(
'contents', 'Eligible',
'uri', 'EmployeeBenefitEnroll.action'
),
3, new Hash(
'contents', 'Waived',
'uri', 'EmployeeBenefitWaived.action'
)
),
4, new Hash(
'contents', 'Reports',
'uri', '',
1, new Hash(
'contents', 'Reports List',
'uri', 'ReportList.action'
)),
5, new Hash(
'contents', 'System',
'uri', '',
1, new Hash(
'contents', 'About',
'uri', 'About.action'
),
2, new Hash(
'contents', 'Help',
'uri', 'CompanyHelp.action'
),
3, new Hash(
'contents', 'Switch Roles',
'uri', 'SecuritySelection.action'
),
4, new Hash(
'contents', 'Change Password',
'uri', 'UserPassAdministration.action'
),
5, new Hash(
'contents', 'Account Settings',
'uri', 'UserSelfAdministration.action'
),
6, new Hash(
'contents', 'Logout',
'uri', 'Login.action'
))
));

RenardDesMers

unread,
May 14, 2007, 7:25:36 AM5/14/07
to DOM Menu Library
In fact, domlib.js uses the Hash class but prototype also declares a
Hash class, so the last one to be declared overwrites the other.
You have to rename all calls to Domlib/Dommenu's Hash (in domlib.js,
dommenu.js and your own code) into something else (like Hash_DomLib)
Then everything will be ok
Reply all
Reply to author
Forward
0 new messages