logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-13-2007, 10:14 PM   #1
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default conditional display of a popupmenu item

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","l ocation='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","l ocation='<% 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 is offline   Reply With Quote
Old 03-14-2007, 03:38 PM   #2
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

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;Provi ncial&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","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 %>'");
mangofreak is offline   Reply With Quote
Old 03-15-2007, 03:00 PM   #3
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

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?
domedia is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com