In the following Javascript code snippet, an array is created for an HierMenu (see
http://www.webreference.com/dhtml/hiermenus ). My question is in respect to the line "javascript:top.location='
www.excite.com'". When this menu item is chosen, then the URL will be displayed within the CURRENT browser window. However, I would like to have the URL displayed in a NEW browser window, so that the original page is not lost, rather than in the current browser window. Can this be done?
arMenu1 = new Array(
160,
"","",
"","",
"#3399FF","#55BBFF",
"#0000FF","#000088",
"Test 1","javascript:top.locatio
n='
www.excite.com'",0,
"Test 2","
http://www.yahoo.com/index.htm",0,
"Services","
http://www.webreference.com/index2.html",0,
"About","
http://www.webreference.com/about.html",0
)
Yes, this can be done, try this out :
use :
javascript:open('www.excite.com')
instead of
javascript
javascript:top.location='www.excite.com
- Holy Spirit