Menyn över en frame..
Menyn över en frame..
Ok, har gjort en enkel java meny som är vågrätt å fäller ut sig neråt.
Jag har gjort en sida med 3 st enkla frames (vågräta).
I frame 1 ska menyn vara nere i botten (kant i kant med frame2).
Men när jag gör min mouse over på menyn (då den ska fällas ner) så fälls den bara ner i sin egna frame1 och inte över frame2 som jag vill ha det.
Hur fan ska jag göra?
Jag har gjort en sida med 3 st enkla frames (vågräta).
I frame 1 ska menyn vara nere i botten (kant i kant med frame2).
Men när jag gör min mouse over på menyn (då den ska fällas ner) så fälls den bara ner i sin egna frame1 och inte över frame2 som jag vill ha det.
Hur fan ska jag göra?
Måste få en sak klargjort först.
Java, eller Javascript?
Java, eller Javascript?
Grundare av webbyrån We made you look http://wemadeyoulook.at
javascript här kommer koden till min meny.
Code: Select all
<html>
<head>
<title>Magnuz Plaze 2.0</title>
<body bgcolor="#888888">
<style>
TABLE#huvud {position: absolute; top: 0px; left: 0px}
TD {font-family: verdana; font-size: 8pt}
.huvud {font-family: verdana; font-size: 8pt; color: #000000; text-decoration: none}
A#lank {font-family: verdana; font-size: 8pt; color: #000000; text-decoration: none}
</style>
<script language="JavaScript">
function visa(obj) {
if(obj.style.display=='none') {
obj.style.display='block'
}
}
function dolj(dolja) {
dolja.style.display='none'
}
function uvisa1(obj) {
obj.style.display='block'
document.all.a1.style.display='block'
}
function udolj1(dolja) {
dolja.style.display='none'
document.all.a1.style.display='none'
}
function uvisa2(obj) {
obj.style.display='block'
document.all.a2.style.display='block'
}
function udolj2(dolja) {
dolja.style.display='none'
document.all.a2.style.display='none'
}
function uvisa3(obj) {
obj.style.display='block'
document.all.a3.style.display='block'
}
function udolj3(dolja) {
dolja.style.display='none'
document.all.a3.style.display='none'
}
function uvisa4(obj) {
obj.style.display='block'
document.all.a4.style.display='block'
}
function udolj4(dolja) {
dolja.style.display='none'
document.all.a4.style.display='none'
}
function uvisa5(obj) {
obj.style.display='block'
document.all.a5.style.display='block'
}
function udolj5(dolja) {
dolja.style.display='none'
document.all.a5.style.display='none'
}
</script>
</head>
<body>
<table border cellpadding="5" cellspacing="0" style="border-width: 1pt; border-style: solid; border-color: #F9F9F9" id="huvud">
<tr>
<td width="100" style="background: #F0F0F0" height="20" onmouseover="visa(a1)" onmouseout="dolj(a1)" id="huvudm"><div onmouseover="this.style.cursor='hand'">Om Magnus </div></td>
<td width="100" style="background: #F0F0F0" height="20" onmouseover="visa(a2)" onmouseout="dolj(a2)" id="huvudm"><div onmouseover="this.style.cursor='hand'">Bilen </div></td>
<td width="100" style="background: #F0F0F0" height="20" onmouseover="visa(a3)" onmouseout="dolj(a3)" id="huvudm"><div onmouseover="this.style.cursor='hand'">Datorn </div></td>
<td width="100" style="background: #F0F0F0" height="20" onmouseover="visa(a4)" onmouseout="dolj(a4)" id="huvudm"><div onmouseover="this.style.cursor='hand'">Bilder </div></td>
<td width="100" style="background: #F0F0F0" height="20" onmouseover="visa(a5)" onmouseout="dolj(a5)" id="huvudm"><div onmouseover="this.style.cursor='hand'">Forum/Länkar</div></td>
</tr>
</table>
<table onmouseover="visa(a1)" onmouseout="dolj(a1)" border id="a1" cellpadding="5" cellspacing="0" style="position: absolute; top: 20px; left: 20px; display: none; border-width: 1pt; border-style: solid; border-color: #F9F9F9">
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="magnus\ommig.html" id="lank">Biografi </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="magnus\vanner.html" id="lank">Vännerna </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="magnus\fullersta.html" id="lank">Fullersta Crew</a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="magnus\marjo.html" id="lank">Flickvännen </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="magnus\bilder.html" id="lank">Bilder </a></div></td></tr>
</table>
<table onmouseover="visa(a2)" onmouseout="dolj(a2)" border id="a2" cellpadding="5" cellspacing="0" style="position: absolute; top: 20px; left: 128px; display: none; border-width: 1pt; border-style: solid; border-color: #F9F9F9">
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilen\mi16.html" id="lank">Peugeot 405 Mi16 </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilen\historia.html" id="lank">Hur pärlan blev min</a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilen\stereo.html" id="lank">Billjudet </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilen\mod.html" id="lank">Vad har jag gjort </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilen\kommer.html" id="lank">Framtida planer </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilen\bilder.html" id="lank">Bilder </a></div></td></tr>
</table>
<table onmouseover="visa(a3)" onmouseout="dolj(a3)" border id="a3" cellpadding="5" cellspacing="0" style="position: absolute; top: 20px; left: 240px; display: none; border-width: 1pt; border-style: solid; border-color: #F9F9F9">
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="datorn\beskrivning.html" id="lank">Beskrivning </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="datorn\mods.html" id="lank">Modifieringar </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="datorn\kommer.html" id="lank">Framtida planer</a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="datorn\bilder.html" id="lank">Bilder </a></div></td></tr>
</table>
<table onmouseover="visa(a4)" onmouseout="dolj(a4)" border id="a4" cellpadding="5" cellspacing="0" style="position: absolute; top: 20px; left: 355px; display: none; border-width: 1pt; border-style: solid; border-color: #F9F9F9">
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilder\magnus.html" id="lank">Bilder på Mig m.fl</a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilder\fest.html" id="lank">Festbilder </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilder\flum.html" id="lank">Flumbilder </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilder\roj.html" id="lank">Röjbilder </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilder\photoshop.html" id="lank">Photoshopat </a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="bilder\annat.html" id="lank">Annat/ Osorterat </a></div></td></tr
</table>
<table onmouseover="visa(a5)" onmouseout="dolj(a5)" border id="a5" cellpadding="5" cellspacing="0" style="position: absolute; top: 20px; left: 470px; display: none; border-width: 1pt; border-style: solid; border-color: #F9F9F9">
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="www.fullerstacrew.tk" id="lank">FullerstaCrew FORUM</a></div></td></tr>
<tr><td width="125" onmouseover="this.style.background='#E0E0E0'" onmouseout="this.style.background='#F0F0F0'" style="background: #F0F0F0" height="20"><div onmouseover="this.style.cursor='hand'"><a href="lank.html" id="lank">Länkar </a></div></td></tr>
</table>
</body>
</html>
Jo, men jag tror inte det går att lösa med enbart javascript. Kanske det går med någon specialare med lager, men jag har svårt att tro det också. Jag hade nog valt att strukturera om mina frames eller använda tabeller/div-boxar istället.skywalker wrote:ingen som kan meka JavaScript?
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
vad menar du med att strukturera om frames? det låter som det enklaste alternativen.nva wrote:Jo, men jag tror inte det går att lösa med enbart javascript. Kanske det går med någon specialare med lager, men jag har svårt att tro det också. Jag hade nog valt att strukturera om mina frames eller använda tabeller/div-boxar istället.skywalker wrote:ingen som kan meka JavaScript?
som sagt, jag är ju inte grym på sånt här men lär mig fort och relativt lätt.
- Jonas Lundh
- Hedersbit
- Posts: 2513
- Joined: 2002-03-07 22:43:22
- Contact:
jag vet att jag har sett en sån meny som går över flera frames och jag är ganska säker på att den är skriven i javascript men jag kan inte komma på var. Så allt jag kan säga är att det går.nva wrote:Jo, men jag tror inte det går att lösa med enbart javascript. Kanske det går med någon specialare med lager, men jag har svårt att tro det också. Jag hade nog valt att strukturera om mina frames eller använda tabeller/div-boxar istället.
Edit: jag vet inte hur man gör det med din meny men jag tror den här ska klara av det: http://web-nova.com/ezmenu.asp och http://milonic.co.uk/menu/ har ett fungerande exempel med menyn över flera frames.
"One does not simply walk into the Signals and Systems exam. Its black gates are guarded by more than just exam guards. There is evil there that does not sleep."
Nja, den första nämnde ingenting alls om frames (förutom att man kan länka till dom ) och den andra "fuskade" genom att visa hela menyn i huvudframen istället, den korsar alltså inte två eller flera frames (http://milonic.co.uk/menu/frames/).jonas wrote:jag vet att jag har sett en sån meny som går över flera frames och jag är ganska säker på att den är skriven i javascript men jag kan inte komma på var. Så allt jag kan säga är att det går.
Edit: jag vet inte hur man gör det med din meny men jag tror den här ska klara av det: http://web-nova.com/ezmenu.asp och http://milonic.co.uk/menu/ har ett fungerande exempel med menyn över flera frames.
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
frameborder="0" i frameset-taggen funkar både i ie och mozilla annars.Fenix wrote:border=0 eller border="0"
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.