onClick="location.href ... not always working

admin

Administrator
Staff member
I want to use a link which at the same time

1) opens a new window with a specific URL
2) opens a new URL in the old window

I have tried
<a href=http://www.webdeveloper.com/forum/archive/index.php/"newwindowURL" target="_blank" onClick="location.href('oldwindowURL')">click here</a>

and this works when I try it (IE6), but I keep getting user feedback that for some people only the new window opens with the newwindowURL, but nothing happens at all in the old window.

How can I deal with this? The users use IE just as me, so it doesn't appear to be a browser issue.

Is either onClick not available for some or is location.href not understandable to some? Can I rewrite this with some errorchecking to make it work for all users?

Thanks for any insight, I am a newbie with this (which you probably already have noticed!).
 
Back
Top