Solved

How can I hide a link in my JSP page.

Posted on 2003-11-06
4
236 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 49

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exception creating bean of class 5 166
issue with pdf generation 2 85
best tutorial on log4j and logging for servlets/jsp codes 1 63
caughtSpeeding java challenge 16 134
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
When we talk about DevOps toolchains, I sometimes wonder how many people really get what we’re talking about. I don’t know if it’s just semantics or tone or something else, but sometimes I think it just sounds like buzzword sausage. So it’s always …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 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

23 Experts available now in Live!

Get 1:1 Help Now