homepage Welcome to WebmasterWorld Guest from 54.197.130.16
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
JavaScript: New Window and Robots
How to open a new window with javascript and still make the robots find it
sudden




msg:1485044
 4:02 pm on Jun 13, 2003 (gmt 0)

I am trying to find a way to open a new window for some links and still make the robots follow these links. I want to configure the new windows, so I think JavaScript is the only way to get what I want.

Somewhere, in an old thread, I found the idea to just do both - a normal link and a javascript link:

<a href="myurl.html" onClick="MM_openBrWindow('myurl.html')">My Link Text</a>

But now the link opens in the new window AND the old window as well. Of course I only want to open it in the new window. Any ideas?

 

BlobFisk




msg:1485045
 4:05 pm on Jun 13, 2003 (gmt 0)

You just need to inform the browser not to follow the default action by adding return false to you onClick event:


<a href="myurl.html" onClick="MM_openBrWindow('myurl.html')
;return false">My Link Text</a>

HTH!

sudden




msg:1485046
 4:09 pm on Jun 13, 2003 (gmt 0)

Thanks a lot, it works!

Macguru




msg:1485047
 4:31 pm on Jun 13, 2003 (gmt 0)

You could also add
onLoad=window.resizeTo(WWW,HHH); in <body> tag of destination page, for the dual purpose of opening this window to the right size when visitors will be referred from a search engine, and the better serve the groing crowd surfing with JS disabled or Pop-Up killers.
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved