Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open

Status
Not open for further replies.

disord3r

Programmer
Apr 12, 2002
189
0
0
US
I have a hyperlink that is opening a new window using window.open. When the hyperlink is clicked, it does open a new window according to the attributes I set in the window.open function, however, the page that contains this hyperlink is changed to a blank page with only the text "[object]". Is there a way for the hyperlink to work as desired while NOT changing the page to say "[object]"?
 
Assuming your code looks like this:
Code:
<A HREF=&quot;javascript: window.open(something here);&quot;>
Try this:
Code:
<A HREF=&quot;javascript: void(window.open(something here));&quot;>
 
Thanks for the responses. I was able to get this working after a few rounds of Google. If it helps anyone out, I was using...

<a href=&quot;javascript:window.open(stuff);&quot;>link</a>

...and I'm now using...

<a href=&quot;#&quot; onClick=&quot;window.open(stuff);&quot;>link</a>.

It works as I had hoped, and I assume it's because the destination of the link is now null, versus previously being a Javascript function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top