New Window Via JavaScript Clears Parent

Posted by Bunch on Geeks with Blogs See other posts from Geeks with Blogs or by Bunch
Published on Fri, 25 May 2012 11:28:35 GMT Indexed on 2012/05/30 16:43 UTC
Read the original article Hit count: 149

Filed under:

This is not a new item at all but I came across it recently. For an app I had been using some JavaScript like:

javascript:window.open(someurl.aspx here)

to open a new window via a button. That bit of code had been working great in several other apps. Then in one app that same code decided to open the new window correctly while clearing the parent of everything but [object]. The fix ended up being simple, change the javascript to:

javascript:void(window.open(someurl.aspx here);

Then it worked like I thought it should.

Tags: ,

© Geeks with Blogs or respective owner