|
-
Dec 21st, 2002, 02:36 AM
#1
Thread Starter
Lively Member
hyperlink question
Hi, this script creates the menu and sub-menus and links them to another page. but it open the links in a new window how to change it to open link in the current window?
Code:
//Create main menu
var menu = new menuObject("menu",pageWidth/2,pageHeight/2,"Gallery",pageHeight/2);
menu.startAngle = -90;
//show menu and caption
menu.show();
menu.showCaption();
//Add submenus
menu.addItem("Personal","window.open('/personal')")
menu.addItem("Friends","toggle");
menu.addItem("Others","toggle");
menu.addItem("Outings","toggle");
menu.addItem("Family","toggle");
menu.subMenus[1].addItem("Friend1","window.open('/script/script22.asp')");
menu.subMenus[1].addItem("Friend2","window.open('/script/script17.asp')");
menu.subMenus[1].addItem("Friend3","window.open('/script/script16.asp')");
menu.subMenus[1].addItem("Friend4","window.open('/script/script15.asp')");
-
Dec 21st, 2002, 04:29 AM
#2
Fanatic Member
Change "window.open" with "location.replace". This will replace the page in the current window. One disadvantage: the "removed" page won't appear in the history.
-
Dec 21st, 2002, 07:08 AM
#3
Frenzied Member
If you use document.location.href='newpage' instead of replece I think it should not damage the history.
-
Dec 21st, 2002, 07:31 AM
#4
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|