open popup in new window


Hi, I am using following code to make table and with linmks,and when the link is clicked,file is opened.But now i want file to be opened in a new window.

var tblBodyObj = window.opener.document.getElementById("maintable").tBodies[0];

var newCell=tblBodyObj.rows[0].insertCell(-1);

var doc = window.opener.document;

var link = doc.createElement('a');

link.href = '../UploadedFilesByUser/'+fname[j]+'';var img= doc.createElement('img');

ext[j]= fname[j].slice(-3)







Please help.



5/5/2009 3:56:39 AM 93655 articles. 6 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 42
Get it on Google Play
Get it on Apple App Store




Plz remember to click "Mark as Answer" if this helped you.
5/5/2009 4:20:33 AM

Add the Target property and that will open it in a new window:


Other options are:

_blank - will open a new browser window with no name.
_self - will replace the current html page, so if it is in a frame or frameset it will load within that frame. If it is the full browser, it will open to replace the page in the full browser.
_parent - will replace the html page it came from.
_top - will load in the current browser by replacing anything within the browser such as a frameset

Malcolm Sheridan
Microsoft Certified Solution Developer
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as
Answer" if a marked post does not actually answer your question.
5/5/2009 5:04:07 AM

 Try with this:


Ahsan Murshed
Please "Mark as Answered" if helpful for you.
5/5/2009 5:23:28 AM

Web resources about - open popup in new window -

Window - Wikipedia, the free encyclopedia
This article is about the part of a building. For the Microsoft operating system, see Microsoft Windows . For other uses, see Window (disambiguation) ...

Microsoft Windows Information, Solutions, Tools - Windows IT Pro
Microsoft Windows information and solutions for IT pros. Topics include cloud computing, Windows Server, Exchange, Outlook, PowerShell, virtualization, ...

The Windows Blog
The Windows Blog is Microsoft's Official Blog for the Windows Operating System.

Microsoft To Only Support New Processors On Windows 10
... support news out of Redmond is particularly surprising. Intel launched it’s 6 th generation Skylake cores back in August, and support on Windows ...

Skylake users given 18 months to upgrade to Windows 10
... die shot. (credit: Intel) If you own a system with an Intel 6th generation Core processor—more memorably known as Skylake—and run Windows 7 ...

Best Windows apps this week
One-hundred and sixty-three in a series. Welcome to this week's overview of the best apps and games released for Windows 8.x and Windows 10 in ...

Why are plane windows round instead of square?
If you've ever traveled by plane, you're likely aware that every airplane window you've ever seen has a round design, whether it be a circle ...

Microsoft has finished rolling out Skype Translator to all Windows users
Microsoft has finished rolling out Skype's much-anticipated real time voice translation service to all of its Windows users, according to a post ...

IDG Contributor Network: Here’s why a jaw-dropping 200 million devices run Microsoft Windows 10
200 million devices are now running Windows 10 all over the world , or almost two-thirds of the entire U.S. population. It’s a bit surprising, ...

Microsoft won't support old Windows versions on new processors
Were you hoping to get a new Windows PC in the office this year without having to move to Windows 10 in the process? You might not have much ...

Resources last updated: 1/17/2016 8:10:05 AM