Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigation Menu Bar

Status
Not open for further replies.

asadzafar

IS-IT--Management
Aug 26, 2004
2
US
hello,
this is the code I am using, the code is working fine. The problem is that I am using the menu in upperwindow of the frame and I want to open the link in the whole page rather than just the upper part of the frame. Any help would be appreciated. I have tried doing the target=_top but it didnt work
Thanks

<script language="JavaScript" src="navcond.js"></script>
<script language="JavaScript">

var myNavBar1 = new NavBar(0);
var dhtmlMenu;

//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below

dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Student", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Add Student", "addstudentform.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("View Student", "studentsearch.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Edit Student", "studentsearch.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Delete Student", "studentsearch.asp"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Employer", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Add Employer", "compaddcompanyform.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("View Employer", "companysearchvw.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Edit Employer", "companysearchvw.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Delete Employer", "companysearchvw.asp"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Contact", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Add Contact", "addcontcompsearch.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("View Contact", "contactsearch.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Edit Contact", "contactsearch.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Delete Contact", "contactsearch.asp"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Job", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Add Job", "companysearch.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("View Job", "jobsearchad.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Edit Job", "jobsearchad.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Delete Job", "jobsearchad.asp"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Applied", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Add Student Applied", "addappliedform.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("View Student Applied", "appliedsearch.asp"));
myNavBar1.addMenu(dhtmlMenu);


dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Archived Jobs", ""));
dhtmlMenu.addItem(new NavBarMenuItem("View Archived Job", "archjobsearchad.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Repost Archived Job", "archjobsearchad.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Delete Archived Job", "archjobsearchad.asp"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Reports", ""));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("User", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Add User", "adduserform.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("View User", "usersearch.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Edit User", "usersearch.asp"));
dhtmlMenu.addItem(new NavBarMenuItem("Delete User", "usersearch.asp"));
myNavBar1.addMenu(dhtmlMenu);

//set menu colors
myNavBar1.setColors("#000000", "#EFE3BD", "#630000", "#ffffff", "#630000", "#EFE3BD", "#630000", "#ffffff", "#630000")
//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")

var fullWidth;

function init() {

// Get width of window, need to account for scrollbar width in Netscape.

fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);

myNavBar1.resize(fullWidth);
myNavBar1.create();
myNavBar1.setzIndex(2);
//UNCOMMENT BELOW LINE TO MOVE MENU DOWN 50 pixels
//myNavBar1.moveTo(0, 200);
}
</script>
 
well you've posted the same javascript code into two threads, and the code you have posted isn't even relevant to your question.
What you have above is menu creation, certainly nothing in there in that sets the target frame

forum216 for javascript

try checking where you downloaded the code from, or try using target="Name_of_your_MainFrame_Here".




Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
hey Chris,
First of all thanks for replying back. But the thing is that it is a menu which is in the split window screen and is in the top window. What I want is that when i click on the drop down menu which is on the top frame, the migration to the link should be done by the whole page(full frame) rather than only the top frame, which is the case now.

Asad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top