PDA

View Full Version : conditional display of a popupmenu item


mangofreak
03-13-2007, 09:14 PM
Hi all,
I'm using DW8 and Classic ASP plus the javascript that DW8 produces.

this is my problem:

I want to restrict access to this menu item:

mm_menu_0126123852_0_1.addMenuItem("Committees","location='pdf_docs/COMMITTEES.pdf'");

and onclick activate this:

onclick="MM_popupMsg('You do not have access to this section. If you are already a member, please Login. If you are not a Member, please sign-up for an application in the Membership section. Thanks.')

So far I have restricted the access to the menu item :

mm_menu_0126123852_0_1.addMenuItem("Committees","location='<% If Session("MM_Userauthorization")<>"" Then %>pdf_docs/COMMITTEES.pdf'<% End If %>");

but launching the message is what i do not know how to do. I had tried in various ways with no luck. Any help will be greatly appreciated.

Thanks,

Javier

mangofreak
03-14-2007, 02:38 PM
Thanks to all readers of my message. I solved my problem by just redirecting the non members to a page with the same message that i had intented on the alert. It works beautifully and I don't have to mess around with the javascript of the popup menu. That's my code.

mm_menu_0126123852_0_1.addMenuItem("OEL&nbsp;Provincial&nbsp;Committees","location='<% If Session("MM_Userauthorization")<>"" Then %>pdf_docs/OEL PROVINCIAL COMMITTEES.pdf<% Else %>error_msg.asp<% End If %>'");

For some reason the following code doesn't want to launch the MM_popupMsg
If anyone has a theory, please let me know. In the meantie my problem is solved.


mm_menu_0126123852_0_1.addMenuItem("Committees","location='<% If Session("MM_Userauthorization")<>"" Then %>pdf_docs/COMMITTEES.pdf' <%else%>MM_popupMsg('You do not have access to this section. If you are already a member, please Login. If you are not a Member, please sign-up for an application in the Membership section. Thanks.');<% End If %>'");

domedia
03-15-2007, 02:00 PM
Glad you found the answer Javier. Unfortunately we don't have many ASP users here, but maybe if you stick around, we can change that? :)