Welcome to WebmasterWorld Guest from 18.205.176.85

Forum Moderators: open

Message Too Old, No Replies

The most basic of basic questions

Javascript links

     
10:35 pm on Jan 6, 2004 (gmt 0)

New User

10+ Year Member

joined:Dec 23, 2003
posts:18
votes: 0


Ok I'm not a developer so here is an easy question for ya. I want some of my links to be invisible to Search Engines, so I want to use javascript links. I have no experience with these and couldn't even find this basic little bit of info on google, only find mouseover stuff. So could someone give me and example of a basic js link and what I need to put in the header and what I need to call it? Thanks
10:37 pm on Jan 6, 2004 (gmt 0)

New User

10+ Year Member

joined:Dec 23, 2003
posts:18
votes: 0


ps, it would be cool to get both the regular code and an example for launching it in a new window.

thanks again

dcrombie

9:46 am on Jan 7, 2004 (gmt 0)

Inactive Member
Account Expired

 
 


<A href="#" onClick="self.location.href='newpage.html';">link in same page</A>

<A href="#" onClick="window.open(insert parameters here);">link to new window</A>

Note: if you have a url in place of the '#' in either case then you should add " return false;" to the onClick handler to stop the browser trying to follow both commands.

;)

4:52 pm on Jan 7, 2004 (gmt 0)

New User

10+ Year Member

joined:Dec 23, 2003
posts:18
votes: 0


Thanks for the answer, I think I finally got it.
6:53 pm on Jan 7, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 17, 2001
posts:1262
votes: 0


I want some of my links to be invisible to Search Engines
I think it has been reported here that Googlebot attempts to visit "anything that looks like a url"; that may or may not apply to the hypothetical 'newpage.html' but I assume it would to a hypothetical 'http://mysite.net/newpage.html'. Just so you know.
8:03 pm on Jan 7, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 20, 2002
posts:3732
votes: 0


I think that is a good point choster. I think if you want truely invisible links then they should be concatinated. Like:

<A href="#" onClick="self.location.href='htt' + 'p:' + '//ww' + 'w.somesite.c' + 'om/newpage.h' + 'tml';">link in same page</A>

8:38 pm on Jan 7, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:July 25, 2003
posts:61
votes: 0


Yikes Korkus, that's a monster to type in each time. :D