Solved

How can I hide a link in my JSP page.

Posted on 2003-11-06
4
241 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
[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
4 Comments
 
LVL 52

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

688 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