PDA

View Full Version : #- What does this do...



bacalao
June 3rd, 2003, 08:54 PM
What does the "#" do and mean after a ahref tag? I've seen it a lot and was just wondering what it did?

kirupa
June 3rd, 2003, 09:23 PM
It is to link to a bookmark within a page =)

Cheers!
Kirupa :crazy:

Raydred
June 3rd, 2003, 10:24 PM
yea.. or it can be a place holder, like, go no where.. ex..


< a href "#" > Dont Go anywhere please </ a >

ussually combined with javascript (this is close, may not be 100% correct...


< a href "#" onclick="java script :tallymyscores()">Who's da winner?</ a >


just some examples =)

c!rYx
June 3rd, 2003, 10:27 PM
Or just go back to the top of the site ?!

Raydred
June 3rd, 2003, 10:28 PM
exactly like

<a name = "top">

<a #top>



something like that, i fogret..
=)

c!rYx
June 3rd, 2003, 11:01 PM
whatever, to come to a conclusion. It is freakin important and without knowing what it does, you can't creat anything ;) something like that

lostinbeta
June 3rd, 2003, 11:13 PM
# is often used when you don't have the link targeting anything. It also brings you back to the top without a frame label.

I often void my links via javascript:void(0) instead of # because that prevents the jump to top.

Really though, the main function of # is to target a named anchor in your page to make the page jump to that anchor instead of the viewer scrolling there.

As raydred was close to doing it goes like this...

Put this before the content you want to jump to
&lt;A NAME="targetThisLine"&gt;

And in your link to get it to jump to the anchor do this...
&lt;A HREF="<B>#</B>targetThisLine"&gt;Link Text&lt;/A&gt;


I hope that helps.

Raydred
June 3rd, 2003, 11:30 PM
ok sure Top my answer ... you always were the smarter twin.. =)

lostinbeta
June 3rd, 2003, 11:32 PM
LOL, I wish. You're the funnier twin. Although you are smarter than me in that server-side stuff. You could take me in that anyday, but that's ok, because I got you beat client-side :evil: (I think)

c!rYx
June 3rd, 2003, 11:35 PM
hahah, you guys are so funny.... I really admire everyone who is really really good in server sided stuff like php + mysql. Client Sided is not that hard to learn...

lostinbeta
June 3rd, 2003, 11:37 PM
Way to kick me when I am down c!rYx... or should I call you Mr. LostIsStupidCauseClientSideIsEasy ???

Now my evil twin will beat me!!!

Or am I the evil twin? I always forget.

c!rYx
June 3rd, 2003, 11:38 PM
Hm, nevermind. But lost get's a plus point for his clean site ;)
Are you happy now ?!?

Raydred
June 3rd, 2003, 11:39 PM
then if he has the clean site... I AM THE EVIL ONE!! Err.. i suppose the flames make it so.. www.raydred.com

lostinbeta
June 3rd, 2003, 11:40 PM
No 'cause I hate my site :P , but that's fine, I am over it already ;)

c!rYx
June 3rd, 2003, 11:41 PM
hehe, yeah, you should make a new one. I mean you have this site since I know you. And that is a really really long time. Seriously

Raydred
June 3rd, 2003, 11:41 PM
lol
we're both evil.. Ha! lol

c!rYx
June 3rd, 2003, 11:41 PM
AHHH ! 700 Posts, I'm still awesome :)

lostinbeta
June 3rd, 2003, 11:42 PM
Originally posted by Raydred
lol
we're both evil.. Ha! lol

Agreed... this works... :evil: :evil:

Raydred
June 3rd, 2003, 11:43 PM
lol yea..

woo hoo! 772 Posts! happy posting to me... happy posting to me... awww.. i have no cake.. o well.