...

View Full Version : "Help!" JavaScript Link Target



RiverStyx
12-11-2006, 07:22 PM
Hi,

I will try to be as precise as possible.

Here is my issue:

I have a website menu created with Javascript. It's a basic website navigating menu with dropdowns when you mouse over links that show the subpages under that root page.

Anyway, the problem I'm trying to figure out is if there is any way to put a target attribute within the links in the menu. Here is a section of code below that I have for one of the links in the menu. The link is "Home" and the source of the link is "Alumni.htm". I want to put a target on the link to "mainFrame" so that when the link is selected the Alumni.htm page will open within a IFRAME I have further down the page.

I basically want this:
<a href="Alumni.htm" target="mainFrame"> but in the Javascript Below.

Does anyone know how this can be accomplished?



Menu1=new Array("Home","Alumni.htm","",0,20,110);

Thanks

_Aerospace_Eng_
12-11-2006, 07:38 PM
We would need to see the rest of the code but from the looks of it you are making the noob mistake of having all of the menu created using javascript. There are better ways particularly the suckerfish drop down menus.

http://alistapart.com/articles/dropdowns/

Good luck.

RiverStyx
12-11-2006, 07:47 PM
Thanks,

I appreciate it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum