javascript window.open fallback

Information and discussion on Javascript.

Moderators: rcrisler1, saltybeagle

javascript window.open fallback

Postby saltybeagle » Wed Jan 12, 2005 11:35 am

A good tip if any of you use javascript to popup small windows for your site -

To allow google to crawl those pages linked to with javascript window.open commands, and allow for users without javascript to browse those pages---use something like this for your anchor tags:

Code: Select all
<a href="index.html" onclick="window.open(this.href,'popper','scrollbars=1,width=325,height=500'); return false;" onkeypress="window.open(this.href,'popper','scrollbars=1,width=325,height=500'); return false;">


This will allow you to utilize all of your javascript popup window control, while still allowing web crawlers and noscript users to navigate the content in your popup windows.
Brett Bieber
Image
saltybeagle
 
Posts: 376
Joined: Fri Jan 16, 2004 3:10 pm
Location: 321 Admin

Return to Javascript

Who is online

Users browsing this forum: No registered users and 1 guest