Forum Moderators: open

Message Too Old, No Replies

Links in javascript popup

Same URL in the usual <a href ...> and in embedded javascript

         

nobug

6:53 pm on Apr 19, 2003 (gmt 0)



Hi,

Can anybody confirm me that this code :

<a href="www.mysite.com"
onClick="window.open('www.mysite.com'); return false;"
onMouseOver="window.status='Click!';return true;" onMouseOut="window.status='';return true;">
<a>www.mysite.com</b></a>

will be considered as a link to the URL www.mysite.com
without any risk for my ranking in SE as Google?

Thanks.

SEO practioner

7:12 pm on Apr 19, 2003 (gmt 0)

10+ Year Member



Nobug hi and welcome to Webmaster World!

Nobug, Google and all the other engines do not recognize any java script url's. If your client (or you) insist on having java script menus at the top or on a side menu, what you need to do is replicate the most important links on a text footer.

The most important ones being, the homepage, products, services, sitemap and contact links.

With that, you will always get the best results in the serp's, not just with Google but all the others too.

Good luck

:-) SEO

jomaxx

7:28 pm on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



SEO_practioner, I think you read the question too quickly...

nobug, Google will almost certainly recognize the URL in the HREF (as long as you precede it with "http://", obviously) and ignore the Javascript elements within the link tag.

nobug

8:17 pm on Apr 19, 2003 (gmt 0)



Seo_practioner, Jeomaxx, thx a lot for your help.

nobug.

tedster

8:21 pm on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've used that kind of code on many sites as the only link to a second page. Those target pages are all in the Google index and cooking away. So you can take that "almost certainly" qualifier away. The code works, and Google has no problem with it.

[edited by: tedster at 8:37 pm (utc) on April 19, 2003]

nobug

8:28 pm on Apr 19, 2003 (gmt 0)



OK - I will proceed this way, I think it is much less heavier than maintaining a parallel pure HTML structure, as it is often done with the "site map" links.

Thank you everyone for your prompt reply.

nobug

nobug

8:50 pm on Apr 19, 2003 (gmt 0)



Oooops - last concern : with this code

<a href="http://www.mysite.com"
onClick="window.open('http://www.mysite.com'); return false;"
onMouseOver="window.status='Click!';return true;" onMouseOut="window.status='';return true;">
<a>www.mysite.com</b></a>

the URL www.mysite.com opens in the popup (I want it) and in the parent window (I do NOT want it - I want to keep the parent window content as is).

Does anyone know a way to prevent the parent window to follow the code indicated in <a href=...?

tedster

8:58 pm on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The return false at the end of the code you have should prevent javascript enabled browsers from changing the parent window's document. Only non-js folks will load the new location in the old window.

tedster

9:01 pm on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Taking another look at your code, I don't think you need the <a> in there at all. It may be causing you problems. Given that there's a </b> tag with no opening tag, it was probably a <b> somewhere along the line.

nobug

9:11 pm on Apr 19, 2003 (gmt 0)



Yes - it was originally a <b>