Solved

How can I hide a link in my JSP page.

Posted on 2003-11-06
4
239 Views
Last Modified: 2012-05-04
Hi, i have this link

<a href="abc.jsp" > ABC </a>

But i would like to make this link invisible for user. Only selected user where informed that there is a hidden link on particular positions can able to know where to click on it.

How?
0
Comment
Question by:fks2
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 150 total points
ID: 9698350
You may make your page password protected, means if a user is logged in, the content will changed accordingly.

To hide the above link, you may need user to login.

if the session is detected, with specified value, show to link, else not show.

Example:

<%
if (session.getAttribute("showlink") != null) {
    if (session.getAttribute("showlink").toString().equals("yes")) {
           %><a href="abc.jsp" > ABC </a>
<%
   }
}
%>
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9698618
I agree with ryancys.
but if you don't already have a login page and there is no plan for it. the direct solution is:
<a href="abc.jsp">&nbsp;&nbsp;</a>
of course, you can use style to change mouse pointer and underlining.
0
 

Expert Comment

by:webhsu
ID: 9781237
Or you can make the font the same color as the background - using css.

<html>
<head>
.itemlink:link {TEXT-DECORATION: none; font-family: Verdana, Arial, Helvetica, sans-serif; color: #white; font-size:13 ;}
</head>

<body bgcolor=white>
<a href="abc.jsp" > ABC </a>
</body>

etc.

and as kenneth said above, you can also change mouse pointer.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9826307
fks2, I believe the B grade is unfair to ryancys. experts will also check you grading history before they answer your future questions.
How to grade:
http://www.experts-exchange.com/help/qnaFAQ.jsp#3
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

829 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