This topic is locked
[SOLVED]

 Modify Menu if Mobile

10/29/2012 5:00:41 PM
ASPRunnerPro General questions
lefty author

I put the following in before process for menu event. Getting syntax error. Any Ideas
function BeforeShowMenu_p3(ByRef xt,ByRef templatefile,ByRef pageObject)

doAssignmentByRef BeforeShowMenu_p3, BeforeShowMenu(xt, templatefile, pageObject)
Function BeforeShowMenu(ByRef xt,ByRef templatefile,ByRef pageObject)
function ModifyMenuItem(byref menuItem)
if menuItem.getTable() = "Unsaleables" and isMobile() then
ModifyMenuItem = false
exit function
end if
ModifyMenuItem = true
end function
I think this is the right place to put it. The help file has the same exact syntax.

admin 10/29/2012

What's the exact code you adding ASPRunnerPro event editor?

What's the exact error message?

lefty author 10/31/2012

oophs forgot to post error message .
Microsoft VBScript compilation error '800a03ea'
Syntax error
/cdi/output9/include/events.asp, line 209
function ModifyMenuItem(byref menuItem)

admin 11/1/2012

It looks like you have inserted a function inside a function. This won't work of course.
ModifyMenuItem is a global event. Simply add your code there and remove all code from BeforeShowMenu event.

lefty author 11/5/2012



It looks like you have inserted a function inside a function. This won't work of course.
ModifyMenuItem is a global event. Simply add your code there and remove all code from BeforeShowMenu event.


Solved . Had code in before process menu event. I did not see global modify menu event at bottom of events page . Probably should be up on top near menu and login events. Thanks.