einbeiniger
10-30-2002, 03:02 PM
i have a script which makes a menu appear, when clicking the right mouse-button. it's just a green box with 4 hyperlinks in it.
the html part of it(i think it's not of interest, but nevertheless):
.................................................................................................... ..
<html>
<head>
<SCRIPT src="images/rightmenu.js" type=text/javascript>
</SCRIPT>
<style>
<!--
#men {
BORDER-RIGHT: 2px outset; BORDER-TOP: 2px outset; Z-INDEX: 1; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: 2px outset; BORDER-BOTTOM: 2px outset; POSITION: absolute; TOP: 0px
}
#men A {
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 4px; MARGIN: 1px 1px 1px 16px; FONT: 12px sans-serif; WIDTH:
100%; PADDING-TOP: 3px; HEIGHT: 100%; TEXT-DECORATION: none
}
.ico {
BORDER-RIGHT: medium none; BORDER-TOP: medium none; FLOAT: left; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none
}
//-->
</style>
</head>
<body>
<SCRIPT type=text/javascript>
eyesys_title="Dachs Menü"
eyesys_titlecol1="black"
eyesys_titlecol2="blue"
eyesys_titletext="white"
eyesys_bg="#229922"
eyesys_bgov="#006699"
eyesys_cl="white"
eyesys_clov="white"
eyesys_width=160
eyesys_init()
eyesys_item('Homepage','images/home.gif','index.htm')
eyesys_item('Comic-Bereich',null,'htms/comics-frameset.htm')
eyesys_item('HiFi-Bereich',null,'htms/hifi-frameset.htm')
eyesys_item('Div. A.-Bereich',null,'htms/diverses anderes-frameset.htm')
eyesys_item('Impressum-Bereich',null,'htms/impressum-frameset.htm')
eyesys_close()
</SCRIPT>
</body>
</html>
.................................................................................................... .
(end of non-interesting part ;) )
the script itself is the following (named rightmenu.js):
............................................................................................
var ie5=window.createPopup
if (ie5)
document.oncontextmenu=init;
var eyesys="";
var preitem="";
function init(){
mx=event.clientX;
my=event.clientY;
menx=window.screenLeft+mx;
meny=window.screenTop+my;
sysmen=window.createPopup();
sysmen.document.write(eyesys);
sysmen.show(menx,meny,eyesys_width,document.getElementById('men').offsetHeight);
return false
};
function eyesys_init(){
if (ie5){
eyesys+=("<style type='text/css'>.textul{position:absolute;top:0px;color:"+eyesys_titletext+";writing-mode: tb-rl;padding-top:10px;filter: flipH() flipV() dropShadow( Color=000000,offX=-2,offY=-2,positive=true);z-Index:10;width:100%;height:100%;font: bold 12px sans-serif}.gradientul{position:relative;top:0px;left:0px;width:100%;background-color:"+eyesys_titlecol2+";height:100%;z-Index:9;FILTER: alpha( style=1,opacity=0,finishOpacity=100,startX=100,finishX=100,startY=0,finishY=100)}.contra{background-color:"+eyesys_titlecol1+";border:1px inset "+eyesys_bg+";height:98%;width:18px;z-Index:8;top:0px;left:0px;margin:2px;position:absolute;}.men{position:absolute;top:0px;left:0px;paddi ng-left:18px;background-color:"+eyesys_bg+";border:2px outset "+eyesys_bg+";z-Index:1;}.men a{margin:1px;cursor:default;padding-bottom:4px;padding-left:1px;padding-right:1px;padding-top:3px;text-decoration:none;height:100%;width:100%;color:"+eyesys_cl+";font:normal 12px sans-serif;}.men a:hover{background:"+eyesys_bgov+";color:"+eyesys_clov+";} BODY{overflow:hidden;border:0px;padding:0px;margin:0px;}.ico{border:none;float:left;}</style><div class='men'>")
}
};
function eyesys_item(txt,ico,lnk){
if (ie5){
if(!ico)ico='s.gif';
preitem+=("<a href='#' onmousedown='parent.window.location.href=\""+lnk+"\"'><img src='"+ico+"' width='16' height='16' class='ico'> "+txt+"</a>")
}
};
function eyesys_close(){
if (ie5){
eyesys+=preitem;
eyesys+=("</div><div class='contra'><div class='gradientul'></div><div class='textul' id='titlu'>"+eyesys_title+"</div></div>");
document.write("<div id='men' style='width:"+eyesys_width+"'></div>");
document.getElementById('men').innerHTML=preitem
}
}
............................................................................................
and all i want now, is a slight change of the script, so that one the hyperlink on which you can click always makes the new site appear in the same window, but NOT ONLY IN THE FRAME WHERE IT ACTUALLY IS. you understand, i have a frameset, and in each of the 3 frames i can open this menu, because i put the code into each of the 3 frames. but the hyperlink should make the frameset explode, just like the funktion "_parent" would.
i really hope somebody can help me with it, i'm just going crazy because i can't figure out a solution...
thank you a lot for reading my question. please help me...
the html part of it(i think it's not of interest, but nevertheless):
.................................................................................................... ..
<html>
<head>
<SCRIPT src="images/rightmenu.js" type=text/javascript>
</SCRIPT>
<style>
<!--
#men {
BORDER-RIGHT: 2px outset; BORDER-TOP: 2px outset; Z-INDEX: 1; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: 2px outset; BORDER-BOTTOM: 2px outset; POSITION: absolute; TOP: 0px
}
#men A {
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 4px; MARGIN: 1px 1px 1px 16px; FONT: 12px sans-serif; WIDTH:
100%; PADDING-TOP: 3px; HEIGHT: 100%; TEXT-DECORATION: none
}
.ico {
BORDER-RIGHT: medium none; BORDER-TOP: medium none; FLOAT: left; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none
}
//-->
</style>
</head>
<body>
<SCRIPT type=text/javascript>
eyesys_title="Dachs Menü"
eyesys_titlecol1="black"
eyesys_titlecol2="blue"
eyesys_titletext="white"
eyesys_bg="#229922"
eyesys_bgov="#006699"
eyesys_cl="white"
eyesys_clov="white"
eyesys_width=160
eyesys_init()
eyesys_item('Homepage','images/home.gif','index.htm')
eyesys_item('Comic-Bereich',null,'htms/comics-frameset.htm')
eyesys_item('HiFi-Bereich',null,'htms/hifi-frameset.htm')
eyesys_item('Div. A.-Bereich',null,'htms/diverses anderes-frameset.htm')
eyesys_item('Impressum-Bereich',null,'htms/impressum-frameset.htm')
eyesys_close()
</SCRIPT>
</body>
</html>
.................................................................................................... .
(end of non-interesting part ;) )
the script itself is the following (named rightmenu.js):
............................................................................................
var ie5=window.createPopup
if (ie5)
document.oncontextmenu=init;
var eyesys="";
var preitem="";
function init(){
mx=event.clientX;
my=event.clientY;
menx=window.screenLeft+mx;
meny=window.screenTop+my;
sysmen=window.createPopup();
sysmen.document.write(eyesys);
sysmen.show(menx,meny,eyesys_width,document.getElementById('men').offsetHeight);
return false
};
function eyesys_init(){
if (ie5){
eyesys+=("<style type='text/css'>.textul{position:absolute;top:0px;color:"+eyesys_titletext+";writing-mode: tb-rl;padding-top:10px;filter: flipH() flipV() dropShadow( Color=000000,offX=-2,offY=-2,positive=true);z-Index:10;width:100%;height:100%;font: bold 12px sans-serif}.gradientul{position:relative;top:0px;left:0px;width:100%;background-color:"+eyesys_titlecol2+";height:100%;z-Index:9;FILTER: alpha( style=1,opacity=0,finishOpacity=100,startX=100,finishX=100,startY=0,finishY=100)}.contra{background-color:"+eyesys_titlecol1+";border:1px inset "+eyesys_bg+";height:98%;width:18px;z-Index:8;top:0px;left:0px;margin:2px;position:absolute;}.men{position:absolute;top:0px;left:0px;paddi ng-left:18px;background-color:"+eyesys_bg+";border:2px outset "+eyesys_bg+";z-Index:1;}.men a{margin:1px;cursor:default;padding-bottom:4px;padding-left:1px;padding-right:1px;padding-top:3px;text-decoration:none;height:100%;width:100%;color:"+eyesys_cl+";font:normal 12px sans-serif;}.men a:hover{background:"+eyesys_bgov+";color:"+eyesys_clov+";} BODY{overflow:hidden;border:0px;padding:0px;margin:0px;}.ico{border:none;float:left;}</style><div class='men'>")
}
};
function eyesys_item(txt,ico,lnk){
if (ie5){
if(!ico)ico='s.gif';
preitem+=("<a href='#' onmousedown='parent.window.location.href=\""+lnk+"\"'><img src='"+ico+"' width='16' height='16' class='ico'> "+txt+"</a>")
}
};
function eyesys_close(){
if (ie5){
eyesys+=preitem;
eyesys+=("</div><div class='contra'><div class='gradientul'></div><div class='textul' id='titlu'>"+eyesys_title+"</div></div>");
document.write("<div id='men' style='width:"+eyesys_width+"'></div>");
document.getElementById('men').innerHTML=preitem
}
}
............................................................................................
and all i want now, is a slight change of the script, so that one the hyperlink on which you can click always makes the new site appear in the same window, but NOT ONLY IN THE FRAME WHERE IT ACTUALLY IS. you understand, i have a frameset, and in each of the 3 frames i can open this menu, because i put the code into each of the 3 frames. but the hyperlink should make the frameset explode, just like the funktion "_parent" would.
i really hope somebody can help me with it, i'm just going crazy because i can't figure out a solution...
thank you a lot for reading my question. please help me...