Results 1 to 8 of 8
Related
-
add code for font size under php echo code Forum: PHP Forum
Replies: 0 -
Dropdown menu hides behind dropdown box Forum: Javascript Forum
Replies: 0 -
MouseOver Dropdown Menu Forum: Javascript Forum
Replies: 3 -
Ignore code and link greeting note code Forum: HTML Forum
Replies: 3
-
05-31-2003, 10:04 AM #1
Help with mouseover dropdown code please
I need help with the dropdown menu code that can be found at http://www.dynamicdrive.com/dynamicindex1/topnavbar.htm
If you scroll down you will eventually come to a apart where it says targeting the links in the frames. Then it shows the code so you can target frames with the mouseover dropdown,
javascript:parent.framename.location='http://dynamicdrive.com'
My question is, where would I put that code in the dropdown menu code? I've tried putting it several places, but it doesn't work.
Please help!
thanks.
-
05-31-2003, 11:33 AM #2
Hiya.
The code is well written, and clever enough to figure out that if a link starts with javascript: then it should be executed, not just linked to.
So the answer is you put the above code where you normally put the links in. Just replace the link with
Code:javascript:parent.framename.location='http://dynamicdrive.com'
if you still have trouble, post your version of the code so we can see whats up.If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
05-31-2003, 12:58 PM #3
Okay I'm still having trouble so here's my code (I'll probably change the colors and stuff later)
<script language="JavaScript" src="navcond.js"></script>
<script language="JavaScript">
/*
Top Navigational Bar II (By Mike Hall)
Last updated: 00/05/08
Permission granted and modified by Dynamicdrive.com to include script in archive
For this and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
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, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Headquarters", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Updates", "updates.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Rules", "rules.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Join the roster", "join.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Staff", "staff.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Roster", "roster.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Champions", "champs.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Newsline", "news.htm"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(110, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Television", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Adrenaline preview", "adrenaline.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Adrenaline results", "adrenalineres.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("PPV - The Prophecy", "PPV.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("PPV Calendar", "calendar.htm"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Interactive", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Create a Tag-Team", "tag.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Create a stable", "stable.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Submit a storyline", "storyline.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Submit newsline content", "submitnews.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Submit match interference", "interfere.htm"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("History", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Main History", "history.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Title History", "titles.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Result Archives", "archives.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Blacklist", "blacklist.htm"));
myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#000000", "#000000", "#C0C0C0", "#ffffff", "#666666", "#000000", "#cccccc", "#ffffff", "#000080")
//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, 50);
}
</script>
-
05-31-2003, 02:02 PM #4
Hi.
try changing the -
Code:dhtmlMenu.addItem(new NavBarMenuItem("Submit a storyline", "storyline.htm"));
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
05-31-2003, 02:29 PM #5
Hmm, tried that, then when I tested the link, it just brought me to an error page. Maybe this will help, this is the URL for the test page - http://www31.brinkster.com/infusionw/maintest.htm
Sorry if I'm annoying, I'm not too great with HTML.
-
05-31-2003, 07:29 PM #6
Ahha.
In your code, you have copied exactly what was on the forum-
Code:java script
However, you did not know thissorry, I should have mentioned it.
Amend your code to remove the space between java and script and it should work fine
PS: Annoying? I come to this forum to help people. All the regulars here do. If people like yourself stopped being 'annoying' this board would be deadWelcome to the forums. Pop back, maybe you will be able to help some people out too
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
07-14-2003, 01:25 PM #7
I used this code and it worked just fine. Thanks. I have a question though. I would like to make the dropdown menu stay at the top of the page no matter what link you choose. In other words, the links in the dropdown menu open underneath the menu, not in a new page. Any ideas on how I can do that?
-
07-29-2003, 08:53 AM #8
Originally Posted by Asimo
must have missed this post, sorry. Are you wanting frames, or is it a targeting issue you are referring to?
Dave
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum