Solved

Prevent access to a visitors

Posted on 2011-09-22
2
190 Views
Last Modified: 2012-08-14
Hi,

I have a menu that has images and onclick event to go to a page.  

how can I do this:

If the user is not a member I need to send them an alert ("this feature is for members only") and prevent them from accessing the page otherwise, they will access the page.

Once the user login a cookie is created to identify the user ID and name

that's user ID cookie
(MemUserID)

User Name cookie
(MemUser)

I need this feature for the following images/menu only:
PostAd.cfm
Post.cfm

the rest of my pages anyone can access.


here's my menu.

<img style="cursor:hand;" src="images/BThome1.gif" alt="" border="0" onClick="parent.location='home.cfm';">

<img style="cursor:hand;"  src="images/BTMyAcc2.gif" alt="" border="0" onClick="parent.location='MyAcc.cfm';">

<img style="cursor:hand;"  src="images/BTPostAd1.gif" alt="" border="0" onClick="parent.location='PostAd.cfm';">

<img style="cursor:hand;"  src="images/BTSearch1.gif" alt="" border="0" onClick="parent.location='post.cfm';">

<img style="cursor:hand;"  src="images/BTChat1.gif" alt="" border="0" onClick="parent.location='Chat.cfm';">

<img style="cursor:hand;" src="images/BTHelp1.gif" alt="" border="0" onClick="parent.location='Help.cfm';">

<img style="cursor:hand;"  src="images/BTContactUs1.gif" alt="" border="0" onClick="parent.location='ContactUs.cfm';">


Thanks,
0
Comment
Question by:lulu50
2 Comments
 
LVL 6

Accepted Solution

by:
bartvd earned 500 total points
Comment Utility
Hey,

It is not safe to do this in javascript. You should do this in a scripting language.
0
 

Author Closing Comment

by:lulu50
Comment Utility
I agree thanks
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now