Autor Zpráva
Schmutzka
Profil
Jak v tomhle udělat odkaz do daného iframu? Je to celkem složité, ale aspoň se zeptám.

var NoOffFirstLineMenus=6; // Number of first level items
var LowBgColor='f0f8ff'; // Background color when mouse is not over
var LowSubBgColor='f0f8ff'; // Background color when mouse is not over on subs
var HighBgColor='151b8d'; // Background color when mouse is over
var HighSubBgColor='151b8d'; // Background color when mouse is over on subs
var FontLowColor='00008b'; // Font color when mouse is not over
var FontSubLowColor='00008b'; // Font color subs when mouse is not over
var FontHighColor='f0f8ff'; // Font color when mouse is over
var FontSubHighColor='f0f8ff'; // Font color subs when mouse is over
var BorderColor='483d8b'; // Border color
var BorderSubColor='483d8b'; // Border color for subs
var BorderWidth=1; // Border width
var BorderBtwnElmnts=0; // Border between elements 1 or 0
var FontFamily="verdana" // Font family menu items
var FontSize=9; // Font size menu items
var FontBold=1; // Bold menu items 1 or 0
var FontItalic=0; // Italic menu items 1 or 0
var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right'
var MenuCentered='center'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
var ChildOverlap=.1; // horizontal overlap child/ parent
var ChildVerticalOverlap=.1; // vertical overlap child/ parent
var StartTop=60; // Menu offset x coordinate (vzdálenost od horního okraje - při vertical=top)
var StartLeft=0; // Menu offset y coordinate (vzdálenost od středu osy x - horizontálně)
var VerCorrect=0; // Multiple frames y correction
var HorCorrect=0; // Multiple frames x correction
var LeftPaddng=10; // Left padding
var TopPaddng=2; // Top padding
var FirstLineHorizontal=1; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
var MenuFramesVertical=0; // Frames in cols or rows 1 or 0
var DissapearDelay=200; // delay before menu folds in
var TakeOverBgColor=0; // Menu frame takes over background color subitem frame
var FirstLineFrame='navig'; // Frame where first level appears
var SecLineFrame='space'; // Frame where sub levels appear
var DocTargetFrame='hlavni'; // Frame where target documents appear
var TargetLoc=''; // span id for relative positioning
var HideTop=0; // Hide first level when loading new document 1 or 0
var MenuWrap=1; // enables/ disables menu wrap 1 or 0
var RightToLeft=0; // enables/ disables right to left unfold 1 or 0
var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover
var WebMasterCheck=0; // menu tree checking on or off 1 or 0
var ShowArrow=0; // Uses arrow gifs when 1
var KeepHilite=1; // Keep selected path highligthed


function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}


// Menu tree
// MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
// For rollover images set "Text to show" to: "rollover:Image1.jpg:Image2.jpg"
/* Menu2=new Array("Fotky","fotky.htm","",5);
Menu2_1=new Array("1. ročník","fotky/prvak.htm","",5,20,150);
Menu2_1_1=new Array("CNN","http://www.cnn.com","",0,20,150);
Menu2_1_5_1=new Array("Vancouver Sun","http://www.vancouversun.com","",0,20,150);
*/

Menu1=new Array("Home","http://oa1a-2004.wz.cz/index2.htm","",0,20,138);
Menu2=new Array("Fotky","fotky.htm","",5);
Menu2_1=new Array("1. ročník","fotky/prvak.htm","",6,20,150);
Menu2_1_1=new Array("2005-03-09, Laborky","fokty/prvak/laborky.htm","",0,20,230);
Menu2_1_2=new Array("2005-05-17, Botanická","fokty/prvak/laborky.htm","",0,20,230);
Menu2_1_3=new Array("2005-05-19, Bučiny","fokty/prvak/laborky.htm","",0,20,230);
Menu2_1_4=new Array("2005-05-23, Zoo","fokty/prvak/laborky.htm","",0,20,230);
Menu2_1_5=new Array("2005-05-26, Ještěd","fokty/prvak/laborky.htm","",0,20,230);
Menu2_1_6=new Array("2005-06-24 - 26, Školní výlet","fokty/prvak/laborky.htm","",1,20,230);
Menu2_1_6_1=new Array("Neprošlo cenzurou","fokty/prvak/laborky.htm","",0,20,230);
Menu2_2=new Array("2. ročník","fotky/druhak.htm","",0,20,150);
Menu2_3=new Array("3. ročník","fotky/tretak.htm","",0,20,150);
Menu2_4=new Array("4. ročník","fotky/ctvrtak.htm","",0,20,150);
Menu2_5=new Array("Others","fotky/others.htm","",0,20,150);
Menu3=new Array("Ankety","ankety.htm","",0,20,150);
Menu4=new Array("Naše třída","nase_trida.htm","",0,20,150);
Menu5=new Array("Profesoři","profesori.htm","",0,20,150);
Menu6=new Array("Fórum","http://www.blueboard.cz/kniha_0.php?id=114340","",0,20, 150);
Schmutzka
Profil
Je k tomu ještě tohle.

var AgntUsr=navigator.userAgent.toLowerCase();
var AppVer=navigator.appVersion.toLowerCase();
var DomYes=document.getElementById?1:0;
var NavYes=AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')== -1?1:0;
var ExpYes=AgntUsr.indexOf('msie')!=-1?1:0;
var Opr=AgntUsr.indexOf('opera')!=-1?1:0;
var Opr6orless=window.opera && navigator.userAgent.search(/opera.[1-6]/i)!=-1 //DynamicDrive.com added code
if(Opr){NavYes=1;ExpYes=0;}
var DomNav=DomYes&&NavYes?1:0;
var DomExp=DomYes&&ExpYes?1:0;
var Nav4=NavYes&&!DomYes&&document.layers?1:0;
var Exp4=ExpYes&&!DomYes&&document.all?1:0;
var Exp6Plus=(AppVer.indexOf("msie 6")!= -1||AppVer.indexOf("msie 7")!= -1)?1:0
var PosStrt=(NavYes||ExpYes||Opr)&&!Opr6orless?1:0;
var P_X=DomYes?"px":"",FHtml=null,ScHtml=null,FCmplnt=0,SCmplnt=0;
var FrstLoc,ScLoc,DcLoc;
var ScWinWdth,ScWinHght,FrstWinWdth,FrstWinHght;
var ScLdAgainWin;
var FirstColPos,SecColPos,DocColPos;
var RcrsLvl=0;
var FrstCreat=1,Loadd=0,Creatd=0,IniFlg,AcrssFrms=1;
var FrstCntnr=null,CurrntOvr=null,CloseTmr=null;
var CntrTxt,TxtClose,ImgStr;
var Ztop=100;
var ShwFlg=0;
var M_StrtTp=StartTop,M_StrtLft=StartLeft;
var StaticPos=0;
var M_Hide=Nav4?'hide':'hidden';
var M_Show=Nav4?'show':'visible';
var Par=parent.frames[0]&&FirstLineFrame!=SecLineFrame?parent:window;
var Doc=Par.document;
var Bod=Doc.body;
var Trigger=NavYes&&!Opr?Par:Bod;

MenuTextCentered=MenuTextCentered==1||MenuTextCentered=='center'?'cen ter':MenuTextCentered==0||MenuTextCentered!='right'?'left':'right';

WbMstrAlrts=["Item not defined: ","Item needs height: ","Item needs width: "];

if(Trigger.onload)Dummy=Trigger.onload;
Trigger.onload=Go;

function Dummy(){return}

function CnclSlct(){return false}

function RePos(){
FrstWinWdth=ExpYes?FCmplnt?FHtml.clientWidth:FrstLoc.document.body.cl ientWidth:FrstLoc.innerWidth;
FrstWinHght=ExpYes?FCmplnt?FHtml.clientHeight:FrstLoc.document.body.c lientHeight:FrstLoc.innerHeight;
ScWinWdth=ExpYes?SCmplnt?ScHtml.clientWidth:ScLoc.document.body.clien tWidth:ScLoc.innerWidth;
ScWinHght=ExpYes?SCmplnt?ScHtml.clientHeight:ScLoc.document.body.clie ntHeight:ScLoc.innerHeight;
if(MenuCentered=='justify'&&FirstLineHorizontal){
FrstCntnr.style.width=FrstWinWdth+P_X;
var LftXtra=(DomNav&&!Opr)||FCmplnt?LeftPaddng:0;
ClcJus();
var P=FrstCntnr.FrstMbr,W=Menu1[5],i;
for(i=0;i<NoOffFirstLineMenus;i++){P.style.width=W+P_X;P=P.PrvMbr}}
StaticPos=-1;
if(TargetLoc)ClcTrgt();
if(MenuCentered)ClcLft();
if(MenuVerticalCentered)ClcTp();
PosMenu(FrstCntnr,StartTop,StartLeft)}

function UnLoaded(){
if(CloseTmr)clearTimeout(CloseTmr);
Loadd=0; Creatd=0;
if(HideTop){
var FCStyle=Nav4?FrstCntnr:FrstCntnr.style;
FCStyle.visibility=M_Hide}}

function ReDoWhole(){
if(ScWinWdth!=ScLoc.innerWidth||ScWinHght!=ScLoc.innerHeight||FrstWin Wdth!=FrstLoc.innerWidth||FrstWinHght!=FrstLoc.innerHeight)Doc.locatio n.reload()}

function Check(WMnu,NoOf){
var i,array,ArrayLoc;
ArrayLoc=parent.frames[0]?parent.frames[FirstLineFrame]:self;
for(i=0;i<NoOf;i++){
array=WMnu+eval(i+1);
if(!ArrayLoc[array]){WbMstrAlrt(0,array); return false}
if(i==0){ if(!ArrayLoc[array][4]){WbMstrAlrt(1,array); return false}
if(!ArrayLoc[array][5]){WbMstrAlrt(2,array); return false}}
if(ArrayLoc[array][3])if(!Check(array+'_',ArrayLoc[array][3])) return false}
return true}

function WbMstrAlrt(No,Xtra){
return confirm(WbMstrAlrts[No]+Xtra+' ')}

function Go(){
Dummy();
if(Loadd||!PosStrt)return;
BeforeStart();
Creatd=0; Loadd=1;
status='Building menu';
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame]){
FirstLineFrame=SecLineFrame;
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame]){
FirstLineFrame=SecLineFrame=DocTargetFrame;
if(FirstLineFrame =="" || !parent.frames[FirstLineFrame])FirstLineFrame=SecLineFrame=DocTargetFr ame=''}}
if(SecLineFrame =="" || !parent.frames[SecLineFrame]){
SecLineFrame=DocTargetFrame;
if(SecLineFrame =="" || !parent.frames[SecLineFrame])SecLineFrame=DocTargetFrame=FirstLineFram e}
if(DocTargetFrame =="" || !parent.frames[DocTargetFrame])DocTargetFrame=SecLineFrame;
if(WebMasterCheck){ if(!Check('Menu',NoOffFirstLineMenus)){status='bu ild aborted';return}}
FrstLoc=FirstLineFrame!=""?parent.frames[FirstLineFrame]:window;
ScLoc=SecLineFrame!=""?parent.frames[SecLineFrame]:window;
DcLoc=DocTargetFrame!=""?parent.frames[DocTargetFrame]:window;
if (FrstLoc==ScLoc) AcrssFrms=0;
if (AcrssFrms)FirstLineHorizontal=MenuFramesVertical?0:1;
if(Exp6Plus||Opr){
FHtml=FrstLoc.document.getElementsByTagName("HTML")[0];ScHtml=ScLoc. document.getElementsByTagName("HTML")[0];
FCmplnt=FrstLoc.document.compatMode.indexOf("CSS")==-1?0:1;SCmplnt=S cLoc.document.compatMode.indexOf("CSS")==-1?0:1}
FrstWinWdth=ExpYes?FCmplnt?FHtml.clientWidth:FrstLoc.document.body.cl ientWidth:FrstLoc.innerWidth;
FrstWinHght=ExpYes?FCmplnt?FHtml.clientHeight:FrstLoc.document.body.c lientHeight:FrstLoc.innerHeight;
ScWinWdth=ExpYes?SCmplnt?ScHtml.clientWidth:ScLoc.document.body.clien tWidth:ScLoc.innerWidth;
ScWinHght=ExpYes?SCmplnt?ScHtml.clientHeight:ScLoc.document.body.clie ntHeight:ScLoc.innerHeight;
if(Nav4){ CntrTxt=MenuTextCentered!='left'?"<div align='"+MenuTextCentered+"'>":"";
TxtClose="</font>"+MenuTextCentered!='left'?"</div>":""}
FirstColPos=Nav4?FrstLoc.document:FrstLoc.document.body;
SecColPos=Nav4?ScLoc.document:ScLoc.document.body;
DocColPos=Nav4?DcLoc.document:ScLoc.document.body;
if (TakeOverBgColor)FirstColPos.bgColor=AcrssFrms?SecColPos.bgColor:DocCo lPos.bgColor;
if(MenuCentered=='justify'&&FirstLineHorizontal)ClcJus();
if(FrstCreat){
FrstCntnr=CreateMenuStructure('Menu',NoOffFirstLineMenus);
FrstCreat=AcrssFrms?0:1}
else CreateMenuStructureAgain('Menu',NoOffFirstLineMenus);
if(TargetLoc)ClcTrgt();
if(MenuCentered)ClcLft();
if(MenuVerticalCentered)ClcTp();
PosMenu(FrstCntnr,StartTop,StartLeft);
IniFlg=1;
Initiate();
Creatd=1;
if (AcrssFrms){
ScLdAgainWin=ExpYes?ScLoc.document.body:ScLoc;
ScLdAgainWin.onunload=UnLoaded}
Trigger.onresize=Nav4?ReDoWhole:RePos;
AfterBuild();
if(MenuVerticalCentered=='static'&&!AcrssFrms)setInterval('KeepPos()' ,250);
status='Menu ready for use'}

function KeepPos(){
var TS=ExpYes?SCmplnt?ScHtml.scrollTop:FrstLoc.document.body.scrollTop:Frs tLoc.pageYOffset;
if(TS!=StaticPos){
var FCStyle=Nav4?FrstCntnr:FrstCntnr.style;
FrstCntnr.OrgTop=StartTop+TS;StaticPos=TS;
FCStyle.top=FrstCntnr.OrgTop+P_X}}

function ClcJus(){
var a=BorderBtwnElmnts?1:2,b=BorderBtwnElmnts?BorderWidth:0;
var Size=Math.round(((FrstWinWdth-a*BorderWidth)/NoOffFirstLineMenus)-b),i ,j;
for(i=1;i<NoOffFirstLineMenus+1;i++){j=eval('Menu'+i);j[5]=Size}
StartLeft=0}

function ClcTrgt(){
var TLoc=Nav4?FrstLoc.document.layers[TargetLoc]:DomYes?FrstLoc.document.g etElementById(TargetLoc):FrstLoc.document.all[TargetLoc];
StartTop=M_StrtTp;
StartLeft=M_StrtLft;
if(DomYes){
while(TLoc){StartTop+=TLoc.offsetTop;StartLeft+=TLoc.offsetLeft;TLoc =TLoc.offsetParent}}
else{ StartTop+=Nav4?TLoc.pageY:TLoc.offsetTop;StartLeft+=Nav4?TLoc.p ageX:TLoc.offsetLeft}}

function ClcLft(){
if(MenuCentered!='left'&&MenuCentered!='justify'){
var Size=FrstWinWdth-(!Nav4?parseInt(FrstCntnr.style.width):FrstCntnr.clip .width);
StartLeft=M_StrtLft;
StartLeft+=MenuCentered=='right'?Size:Size/2}}

function ClcTp(){
if(MenuVerticalCentered!='top'&&MenuVerticalCentered!='static'){
var Size=FrstWinHght-(!Nav4?parseInt(FrstCntnr.style.height):FrstCntnr.cli p.height);
StartTop=M_StrtTp;
StartTop+=MenuVerticalCentered=='bottom'?Size:Size/2}}

function PosMenu(CntnrPntr,Tp,Lt){
RcrsLvl++;
var Cmplnt=RcrsLvl==1?FCmplnt:SCmplnt;
var LftXtra=(DomNav&&!Opr)||Cmplnt?LeftPaddng:0;
var TpXtra=(DomNav&&!Opr)||Cmplnt?TopPaddng:0;
var Topi,Lefti,Hori;
var Cntnr=CntnrPntr;
var Mmbr=Cntnr.FrstMbr;
var CntnrStyle=!Nav4?Cntnr.style:Cntnr;
var MmbrStyle=!Nav4?Mmbr.style:Mmbr;
var PadL=Mmbr.value.indexOf('<')==-1?LftXtra:0;
var PadT=Mmbr.value.indexOf('<')==-1?TpXtra:0;
var MmbrWt=!Nav4?parseInt(MmbrStyle.width)+PadL:MmbrStyle.clip.width;
var MmbrHt=!Nav4?parseInt(MmbrStyle.height)+PadT:MmbrStyle.clip.height;
var CntnrWt=!Nav4?parseInt(CntnrStyle.width):CntnrStyle.clip.width;
var CntnrHt=!Nav4?parseInt(CntnrStyle.height):CntnrStyle.clip.height;
var SubTp,SubLt;
if (RcrsLvl==1 && AcrssFrms)!MenuFramesVertical?Tp=FrstWinHght-CntnrHt+(Nav4?4:0):Lt=Rig htToLeft?0:FrstWinWdth-CntnrWt+(Nav4?4:0);
if (RcrsLvl==2 && AcrssFrms)!MenuFramesVertical?Tp=0:Lt=RightToLeft?ScWinWdth-CntnrWt:0;
if (RcrsLvl==2 && AcrssFrms){Tp+=VerCorrect;Lt+=HorCorrect}
CntnrStyle.top=RcrsLvl==1?Tp+P_X:0;
Cntnr.OrgTop=Tp;
CntnrStyle.left=RcrsLvl==1?Lt+P_X:0;
Cntnr.OrgLeft=Lt;
if (RcrsLvl==1 && FirstLineHorizontal){
Hori=1;Lefti=CntnrWt-MmbrWt-2*BorderWidth;Topi=0}
else{ Hori=Lefti=0;Topi=CntnrHt-MmbrHt-2*BorderWidth}
while(Mmbr!=null){
MmbrStyle.left=Lefti+BorderWidth+P_X;
MmbrStyle.top=Topi+BorderWidth+P_X;
if(Nav4)Mmbr.CmdLyr.moveTo(Lefti+BorderWidth,Topi+BorderWidth);
if(Mmbr.ChildCntnr){
if(RightToLeft)ChldCntnrWdth=Nav4?Mmbr.ChildCntnr.clip.width:parseI nt(Mmbr.ChildCntnr.style.widt
Leo
Profil
Proboha co to je? Leo
Schmutzka
Profil
Menu.
habendorf
Profil
Schmutzka: Na rovinu - v týhle prasečině se ti nikdo hrabat nebude.
Schmutzka
Profil
Hmm, to jsem si myslel.
Schmutzka
Profil
Hmm, to jsem si myslel.
peta
Profil *
Schmutzka: V zadnem pripade to neni menu. To je jakysi dabelsky kod. Pokud chces poradit, musis to zjednodusit.

Jednoduchy script mam treba na //vampierka.wz.cz si to prohledni a posud sam :)
Pokud by melo byt viceurovnove, resil bych to podobne,
menu=[
0,"xxx.htm","ahoj",
1,"yyy.htm","ahojuroven2",
1,"zzz.htm","ahojuroven2"
]
prvni cislo je uroven a zbytek si zaridi uz script, ktery to generuje do htm, ktery by mel tak podobnou velikost
Schmutzka
Profil
No jo ale já potřebuju, aby to odkazovalo do jiného iframu.
Leo
Profil
Menu vypada treba takhle:

<ul id="menu">
<li><a href="uvod.html">Uvod</a></li>
<li>
<a href="nabidka.html">Nabidka</a>
<ul>
<li><a href="boty.html">Boty</a></li>
<li><a href="kalhoty.html">Kalhoty</a></li>
</ul>
</li>
<li><a href="kontakt.html">Kontakt</a></li>
</ul>

To, co jste poslal neni menu ani v nejdivocejsich snech, Leo
Schmutzka
Profil
Je to ze stránky [url=http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm]http:/ /www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm[url]
Leo
Profil
Prefabrikovane univerzalni veci vetsinou stoji za... Leo
Fred
Profil
Tak to je mazec ;-) Díval jsem se na dynamicdrive a kupodivu to funguje i v gecku. Výsledek ale vypadá skoro stejně jako normální menu
Příklad: http://www.htmldog.com/articles/suckerfish/dropdowns/example/vertical. html
Článek: http://www.htmldog.com/articles/suckerfish/dropdowns/
lmn
Profil
pokud to správně chápu chceš např. menu2 s názvem 2005-03-09, Laborky,aby se otevřelo v jiném framu.
takže,takhle to vypadá u tebe

Menu2_1_1=new Array("2005-03-09, Laborky","fokty/prvak/laborky.htm","",0,20,230);

a pokud chceš k tomu odkazu přidat frame,tak napíšeš název toho framu mezi ty dvě volné uvozovky.Takže to bude vypadat asi takhle

Menu2_1_1=new Array("2005-03-09, Laborky","fokty/prvak/laborky.htm","main",0,20,230);
Toto téma je uzamčeno. Odpověď nelze zaslat.