An indexable popup… it’s possible!

Mario Laflamme March 10th, 2006

The use of popups is very wide-spread, but most of the time they are not indexable. Nevertheless, there is a very simple way to conceive popups which can be crawled by the robots of search engines.

Demonstration

Insert the url of the popup in the href tag and insert the function which opens the popup in the onclick tag followed by the return false; command as in the following example:

<a href=”example.html” onclick=”openPopup(this.href);return false;”>popup example</a>

Explanations

This way allows the robots to follow the link in the href tag while opening the link in a popup with the openPopup() function which gets back the content of the href tag.

Entry Filed under: SEO, JavaScript

1 Comment

  • Patrick Fitzgerald March 10th, 2006 at 11:29 am

    Yep, that’s definitely the way to go. In the onclick handler, “this” refers to the element that triggered the event. You can also use it to do other neat stuff like changing the style of the link, or finding the parent node of the link and doing stuff to it. Sometimes I even add variables to the link, then refer to them in the event handler. Cool stuff!

Leave a Comment

Required

Required, hidden

Some HTML allowed

Trackback this post  |  Subscribe to the comments via RSS Feed

Schedule

March 2006
M T W T F S S
    Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031