?
Solved

Prevent access to a visitors

Posted on 2011-09-22
2
Medium Priority
?
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
bartvd earned 2000 total points
ID: 36583561
Hey,

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

Author Closing Comment

by:lulu50
ID: 36719833
I agree thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…
Suggested Courses

801 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