Board Logo

opening link in pop-up window with preset size/position/options (window.open method)
tigra - 12/2/2004 at 06:55 PM

Sometimes there is a need to open menu link in pop-up window with preset size, position and options. This can be done usgins window.open method.

Calling this method directly from items structure opens the window but also causes invalid display in parent window. Proper way to call window.open from tigra menu products is via javascript function:

in intms structure:
['Pop-Up Window', "javascript:nw('http://www.softcomplex.com')", {'tw':'_self'}],

below items structure:
function nw(url, name) {
window.open(url,(name ? name : '_blank'),'HEIGHT=300,WIDTH=300,TOP=200,LEFT=200,scrollbars=yes');
}

When using window.open call make sure the target for the link is set to '_self' or not specified anywhere (_self by default). This approach will work with all drop down and tree tigra menus.

Full details about window.open method at MSDN:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp


See working sample attached.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/