Link to home
Start Free TrialLog in
Avatar of _D_
_D_

asked on

silly question (<a>)

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?

thanks
Avatar of lexxwern
lexxwern
Flag of Netherlands image

<a nohref ... ></a>
Avatar of _D_
_D_

ASKER

hmm, nohref seems to be an <area> thing for image maps
nohref can be used anywhere href is used. please explain futher if this isn't what you are looking for.
or this may help too
<a href="#" ... ></a>
Avatar of _D_

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of lexxwern
lexxwern
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Indeed is impossible to do.
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:
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_?
<a href="JavaScript:x('1')">link</a>

Then put this in the head:
<script language="JavaScript">
<!--
   function(pntr)
   {
      newloc='http://relative/path/text'+'pntr';
      window.location=newloc;
   }
//-->
</script>

Avatar of _D_

ASKER

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.