Menu som i dating's chat...
Jeg vil have hjælp til at lave en menu magen til den som der er i Dating..Det er den menu inde i chatten. Den i siden, hvor brugerne står. Jeg har scriptet...
.........................................
<HTML>
<HEAD>
<link href="chattyle.css" rel="stylesheet">
<style>
select {font-weight: 700;}
</style>
</HEAD>
<BODY style="margin: 5px; margin-right: 0px; margin-top: 0px; margin-bottom: 130px;" onload="window.parent.sync(4);" oncontextmenu="return false;" onselectstart="window.event.returnValue=false;" onmouseup="hidePopup();" ondrag="return false";>
<script language="JavaScript" src="show_popup.js"></script>
<script language="javascript">
fMenuColor = '800000';
fMenuColor_h = '903030';
mMenuColor ='000080';
mMenuColor_h = '303090';
currentGlow = mMenuColor;
currentBG = mMenuColor;
var showFor = '';
var showForID = '';
function handleClick() {
lmnt = window.event.srcElement;
if (lmnt.tagName == 'IMG' || lmnt.tagName == 'SPAN') {
lmnt = lmnt.parentElement;
}
if (lmnt.tagName != 'DIV')
return;
showFor = lmnt.fullname;
showForID = lmnt.id.substr(4);
so = document.all.item('usermenu').style;
so.top = lmnt.offsetTop+11;
if (lmnt.className == 'male') {
currentGlow = mMenuColor_h;
currentBG = mMenuColor;
}
else {
currentGlow = fMenuColor_h;
currentBG = fMenuColor;
}
if (lmnt.userlevel <5) {
document.all['ignore'].style.display = '';
if (lmnt.style.textDecoration == 'line-through') {
document.all['ignore'].innerHTML = 'Stop filter';
}
else {
document.all['ignore'].innerHTML = 'Start filter';
}
}
else {
document.all['ignore'].style.display = 'none';
}
so.background = currentBG;
// document.all.item('usermenu').filters.blendtrans.apply();
so.visibility = 'visible';
// document.all.item('usermenu').filters.blendtrans.play(0.3);
}
function hidePopup(){
if (showFor != '' && window.event != null) {
window.event.cancelBubble = true;
//document.all.item('usermenu').filters.blendtrans.apply();
document.all.item('usermenu').style.top = 100;
document.all.item('usermenu').style.visibility = 'hidden';
document.all.item('container').style.background = document.all.item('container').style.background; //workaround for IE bug
//document.all.item('usermenu').filters.blendtrans.play(0.2);
showFor = '';
showForID = '';
}
}
function hidePopup2(){
switch (event.srcElement.innerHTML) {
case 'Se profil':
showAccount(showForID, 2)
//window.open("../../account/show.asp?readfrom=3&popup=true&recid=" + showForID, "Info","width=630,height=500,resizable=yes,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes");
break;
case 'Tilføj favoritliste':
window.open("../../account/show_p.asp?readfrom=2&addtofav=true&popup=true&recid=" + showForID, "Info","width=630,height=500,resizable=yes,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes");
break;
case 'Skriv til...':
window.parent.client.sendPublicTo(showFor);
break;
case 'Skriv privat til...':
window.parent.client.sendPrivateTo(showFor, showForID);
break;
case 'Skriv brev':
window.open("../../Mail/WriteLetter.asp?RecID="+showForID+"&Reply=-1&popup=true","WriteMail"+ Math.floor(Math.random()*1000),"width=615,height=445,resizable=yes,status=no,toolbar=no,menubar=no,location=no");
break;
case 'Følg efter':
window.parent.frames['client'].setFollow(showFor, showForID);
break;
case 'Buzz':
window.parent.frames['client'].buzz(showFor, showForID);
break;
case 'Start filter':
window.parent.frames['client'].ignoreUser(showForID, showFor);
break;
case 'Stop filter':
window.parent.frames['client'].stopIgnoringUser(showForID, showFor);
break;
}
hidePopup();
}
function glow() {
if (event.srcElement.id != 'usermenu') {
event.srcElement.style.background = currentGlow;
}
}
function noglow() {
if (event.srcElement.id != 'usermenu')
event.srcElement.style.background = ''; // inherrits bgcolor from parent.
}
</script>
<span align=center id=container onmousedown="handleClick();" onmouseup="hidePopup();"></span>
<div id=usermenu style="border: 2px solid black; cursor: hand;filter:blendtrans(duration:0.300); position: absolute; visibility: hidden; z-index:1; background: 000080; color:ffffff; font-weight: 700; left:12;" onmouseup="hidePopup2();" onmouseover="glow();" onmouseout="noglow();">
<div>Skriv til...</div>
<div id=priv>Skriv privat til...</div>
<span id=profile>
<div>Se profil</div>
<div>Tilføj favoritliste</div>
<div>Skriv brev</div>
</span>
<div>Følg efter</div>
<div>Buzz</div>
<div id=ignore>Start filter</div>
</div>
</BODY>
</HTML>
......................................................
Det skal være så da, at når jeg trykker på en bruger kommer der en menu frem...
Med Venlig Hilsen
Marc
