Forum Moderators: open
</a> <a href="javascript:window.open('oldnews.html', 'displayWindow', 'width=680,height=400,scrollbars=yes')">Old News</a>
Works great, except when that smaller window is open the main window goes blank with just the text [object] on it.
What am I missing?
...scrollbars=yes'); [blue]void 0;[/blue]"> The page will go to the value of the last statement (it's an href). The [object] you are getting is the object reference (to the new window) returned by the open() method.
I think many here would in fact suggest this instead:
<a href="oldnews.html" onclick="window.open(..as before..);return false;"> If Javascript is enabled, it works normally, but the
return false prevents the href link being followed. If JS is disabled, then the main page goes there instead, so at least they get there somehow.