I have a drop-down menu within a frame that is spawed with a href="#" on a button. I have it set up so when you click the button that spawns a page in the content frame.
Problem is that 1 of the buttons needs to open a new window. I can't use a target=_top or whatever 'cuz that would just load the navigation again.
I tried this but it just loads it in the same window:
... onmouseup="top.location.href='url.com'; ...
function tmt_findObj(n){
var x,t;
if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
}
else{x=document.getElementById(n)}
return x;
}
function menu() {
var i,p,v,obj,args=menu.arguments;
if(document.getElementById){
for (i=0; i<(args.length-2); i+=3){
obj=tmt_findObj(args[i]);v=args[i+2];
v=(v=='show')?'visible'v='hide')?'hidden':v;
if(obj)obj.style.visibility=v;}}
else{
for (i=0; i<(args.length-2);i+=3)
if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible'v='hide')?'hidden':v; }
obj.visibility=v;}
}
}
Here is the <div> tag for what the menu item looks like:
<div id=multimedia style="Z-INDEX: 3; LEFT: 290px; VISIBILITY: hidden; WIDTH: 100px; POSITION: absolute; TOP: 47px; HEIGHT: 1px">
Its one of those Dreamweaver made scripts so that might be what the problem is.
Works like a charm!!! I can't believe I didn't notice that! Such a stupid error. Guess the stupid errors are always the one's that cause the headaches.
Bookmarks