Forums

ASP

This topic is locked

conditional display on a popup menu

Posted 13 Mar 2007 20:38:14
1
has voted
13 Mar 2007 20:38:14 Javier Castro posted:
Hi all,

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/OEL PROVINCIAL 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

Replies

Replied 14 Mar 2007 16:48:58
14 Mar 2007 16:48:58 Javier Castro replied:
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("Committees","location='<% If Session("MM_Userauthorization"<>"" Then %>pdf_docs/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","l ocation='<% 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 %>'";

Javier

Reply to this topic