[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Prevent access to a visitors

Posted on 2011-09-22
2
Medium Priority
?
198 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 …
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…

649 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