silly question (<a>)

Posted on 2002-05-14
Last Modified: 2010-04-09
I have several links whose only purpose is to contain information without taking up much screen space, ie the users right click on these one word links and "copy link location" to get several hundred characters of text.

my question is - is there any way for me to have just that text in the link? ie, without "http://" without relative paths or any other tags (mailto:, etc)?  If not, what's the least amount of extra text I can get it to display?

Question by:_D_
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
LVL 12

Expert Comment

ID: 7010177
<a nohref ... ></a>

Author Comment

ID: 7010250
hmm, nohref seems to be an <area> thing for image maps
LVL 12

Expert Comment

ID: 7010361
nohref can be used anywhere href is used. please explain futher if this isn't what you are looking for.
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

LVL 12

Expert Comment

ID: 7010363
or this may help too
<a href="#" ... ></a>

Author Comment

ID: 7010395
nohref definitely doesn't help here.
I need to have a link: <a href='text'>link</a>
and be able to right-click on it and copy 'text', not 'http://relative/path/text'

with # it sets it up as an acnchor on the current page, the URI for the page is added to the link.
LVL 12

Accepted Solution

lexxwern earned 50 total points
ID: 7010403
i dont think that is possible. sorry.
all browsers automatically add he environment path to the link.
LVL 22

Expert Comment

ID: 7010425
Indeed is impossible to do.

Expert Comment

ID: 7010476
You could use a javascript popup window with the text in it. The use could copy the text then close the window when they are done. Not quite as easy as a right click, but it would work and take away the need to remove the http:
LVL 12

Expert Comment

ID: 7010559
i think _D_ is doing this because he has a website that uses frames and he wants to protect the actual path of the page? am i correct _D_?
LVL 53

Expert Comment

ID: 7010733
<a href="JavaScript:x('1')">link</a>

Then put this in the head:
<script language="JavaScript">


Author Comment

ID: 7012434
lexx, no actually, I have a lot of text (hundreds of characters) that has to be available to the user, but not take up all of the screen space.  right now I did a <a href='text:textdatathatineed'> and the user just has to delete the 'text:' after copying and pasting, which works, I guess, but if anyone has any better ideas, I'm all ears.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

695 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