Forum Moderators: open

Message Too Old, No Replies

How to make Search enging robot follow this Js Pop-up code

Search engine robot for Javascript pop-up

         

koppted

5:20 pm on Dec 30, 2005 (gmt 0)

10+ Year Member




is there a way i could modify this code to let search engines follow it?

<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=430,height=450,scrollbars=yes');
return false;
}
//-->
</SCRIPT>

RonPK

5:48 pm on Dec 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<a  
href="foo.html"
onclick="return popup(this.href,'somename');"
target="_blank">
click me
</a>

That makes your popup link SE-friendly - and also lets JavaScript challenged users enjoy foo.html.

koppted

7:53 am on Dec 31, 2005 (gmt 0)

10+ Year Member



That makes your popup link SE-friendly - and also lets JavaScript challenged users enjoy foo.html.

what if i still want to make it SE-friendly, but dont want people who don't have javascript enabled, not to be able to view it?

RonPK

2:47 pm on Dec 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Any link that can be read by a search engine, can be read by users with a normal browser. Why on earth would you not want that?

The only way around this 'problem' is to serve a different page to search engines than to ordinary visitors. Fortunately, most engines don't appreciate such cloaking tactics.