 |
Ask Marketing Experts search engine marketing forum Free search engine marketing advice
|
| Author |
Message |
admin Site Admin
Joined: 11 Feb 2003 Posts: 310 Location: Los Angeles
|
Posted: Fri May 14, 2004 12:12 pm Post subject: create spider friendly popups |
|
|
Most popup windows, especially those automatically generated from WYSISYG programs are totally invisible to search engine spiders and wreak havoc on non JavaScript enabled browsers, usability, mobile phones etc.
This is the most widely accepted solution:
[code:1:a369a37fbe]<a HREF="/link.html" onclick="popUp(this.href); return false">[/code:1:a369a37fbe]
code for the head portion of your page:
[code:1:a369a37fbe]<script LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=500,left=300,top=50');");
}
// End -->
</script>[/code:1:a369a37fbe]
This creates a popup in modern browsers, and a valid link for everyone else. You can also add custom behavior to each popup instead of in the header script. |
|
| Back to top |
|
 |
|
|