Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: open
and make the window that remains still the same as where they left it!
Heres what I managed to work out myself:
but the window that's left behind just has a blank page with:
or something on it?
And, that line still got executed, and the new window, blah.html, opened as well.
Right? Hehe Im not totally clear on all of this.
So, instead, I made a one-line fuction called doit() with just
window.open("blah.html"); in it
and the href looks like:
And it worked great!
Spider-friendly, 'cuz the href attribute is there and gets used. No change to the current window because if the onclick handler returns false, the browser isn't supposed to follow the link.
<added>Also degrades well, since if js is disabled, the browser still has a link to follow, and will.</added>
[edited by: dingman at 3:24 pm (utc) on Oct. 3, 2002]
Can I see the function?
Now, here is another way: (I am not very sure about the whole "spider-friendly" thing, because I dont even know what that is ;))
the windowHandle.focus is quite necessary...
If the former, my guess would be that instead of
<a href="http://www.mysite.com/other.html" onclick="window.open(this.href);return false;">another page (new window)</a>
you could do
<a href="doesn't matter as long as onclick returns false" onclick="window.open('other.html');return false;">another page (new window)</a>
If the latter, enlighten me :)
I'm a lot less experienced than you are, and search engine behavior is not something I'm used to thinking about, let alone knowledgable about. September 10th, I didn't even know what "page rank" was. Might want to ask whether googlebot or any of the other search engine spiders have js interpreters. If so, I don't think anything we've looked at will hide from them.