Main Menu
All times are in GMT -7 :: The time is now 10:18 pm.
Sub Menu
Knowledgebase Sections
Article Data
- Article Ref
- 5085-EYPC-1143
- Written By
- tigra
- Date Created
- Sun, 11th Feb 2007
- Updated By
- tigra
- Date Modified
- Sun, 11th Feb 2007
Article Actions
Opening link in pop-up window with preset size/position/options (window.open method)
Question
How to make the menu link open the new window with specific size and position?
Answer
Sometimes there is a need to open menu link in pop-up window with preset size, position and options. This can be done usging 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.
More information about window.open method can be found in MSDN
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.
More information about window.open method can be found in MSDN
Attachments
- window_open_sample.zip (File Size : 14.6 KB)
Article Comments
There are currently no comments.





