Skip to content Skip to sidebar Skip to footer

How Do They Hide Url When Mouseover?

Everybody knows that the good old school windows.status is not working anymore when mouseover a link. However, I found a site which seems to be blanking out the URL link while the

Solution 1:

Perhaps I'm unclear on what you're trying to do (since the example link is gone), but does this seem right?

HTML:

<ahref="">Link</a>

jQuery:

$("a").click(function() {
location.href="www.yahoo.com";
returnfalse;
});

Solution 2:

class="vmenuballon" onclick="javascript:parent.location.href='home'" onmouseover="window.tip='back'"alt="back" title="back" >Home

Solution 3:

Google AdSense uses an onclick JavaScript event handler to redirect the user in this case, not the href attribute of a link. Here is the (approximate) source code of the element (several iframes deep) that traps the user's mouse click. According to Firebug, the user's mouse click goes to the outer td element.

<tdvalign="middle"align="center"onclick="ga(this,event)"onmouseout="cs()"onmouseover="return ss('go to www.Solar-Aid.org','aw0')"onmousedown="st('aw0')"onfocus="ss('go to www.Solar-Aid.org','aw0')"class="ch"id="taw0"><divstyle="overflow: hidden; word-wrap: break-word; width: 116px;"><fontface="impact, poster bodoni, geneva"style="font-size: 20px;"><astyle="text-decoration: none;"class="textcolor"onmouseout="cs()"onmouseover="return ss('go to www.Solar-Aid.org','aw0')"onmousedown="st('aw0')"onclick="ha('aw0')"onfocus="ss('go to www.Solar-Aid.org','aw0')"href="http://googleads.g.doubleclick.net/pagead/iclk?sa=l&amp;ai=BBuZpfBTrTMqHJ8zLsQfDsviMDfKumAKzyl3SmZ0CABABGAEgACgEOACCAQZjYS1wdWKIAQGQAfDkArIBDXNvbGFyLWFpZC5vcme6AQoxMjB4NjAwX2FzwAEC2gEZaHR0cDovL3d3dy5Tb2xhci1BaWQub3JnL8gDFw&amp;num=1&amp;adurl=http://www.Solar-Aid.org/&amp;client=ca-pub-0563973986972825&amp;nm=34"target="_top"id="aw0">
        Solar Energy Charity
      </a></font><br><br><br><!-- snip --></div></td>

The actual text links are irrelevant; they are farther down than the height of the spammer's mouse-following iframe (which has a set opacity of 0.1, so it remains nearly invisible to the user). ga is just a function that changes the outside window's URL using top.location.href:

functionga(o, e) {
  if(document.getElementById) {
    a = o.id.substring(1);
    // snip
    top.location.href = document.getElementById(a).href;
  }
}

By the way, there's no need to worry about the spammer making money when you click on that particular ad because it is a public service ad (PSA). Clicks on PSAs do not earn any money for a publisher, and Google can show PSAs for several reasons including that the AdSense account has not been approved.

Post a Comment for "How Do They Hide Url When Mouseover?"