Autor Zpráva
marian_pd
Profil
Zohnal som si program AllWebMenus a vytvoril som si menu. Program mi však vytvoril iba súbor v JavaScripte. Neviem ako ho mám spustiť cez súbor html. Skúšal som už niekoľko možností, ktoré som našiel na nete, ale nič nefungovalo. Dík.
peta
Profil
marian_pd
"mi však vytvoril"
nelze resit neco, co nemame.

jak se spousti js?
a) jakpsatweb - javascript
jak zacit, jak se vklada script do stranky, a pod
b)
jakpsatweb - javascript - priklady - priklad na externi JS
<script src=neco.js></script>
neco.js obsahuje na konci funkci zobraz_menu();
c)
jakpsatweb - javascript - priklady - priklad na JS vepsany do stranky
<script>cely obsah souboru; zobraz_menu();</script>

tot obecne
marian_pd
Profil
spôsob <script src=neco.js></script> som skúšal. Nič . Čistá stránka. Ak chceš vedieť presne aký script program vytvoril tak tu to je:
Súbor sa volá menu.js a k nemu vytvoril ešte jeden adresár s ďalšími 7 súbormi .js a 7 obrázkami. Tieto súbory budú určite pracovať už automaticky po spustení menu.js. Aspoň si myslím. Presný kód menu.js :
//----------DHTML Menu Created using AllWebMenus PRO LinkBack ver 4.2-#656---------------
var awmMenuName='menu';
var awmLibraryBuild=656;
var awmLibraryPath='/awmdata';
var awmImagesPath='/awmdata';
var awmSupported=(navigator.appName + navigator.appVersion.substring(0,1)=="Netscape5" || document.all || document.layers || navigator.userAgent.indexOf('Opera')>-1 || navigator.userAgent.indexOf('Konqueror')>-1)?1:0;
if (awmAltUrl!='' && !awmSupported) window.location.replace(awmAltUrl);
if (awmSupported){
var nua=navigator.userAgent,scriptNo=(nua.indexOf('Safari')>-1)?7:(nua.ind exOf('Gecko')>-1)?2:((document.layers)?3:((nua.indexOf('Opera')>-1)?4: ((nua.indexOf('Mac')>-1)?5:1)));
var mbi=document.location,xt="";
var mpa=mbi.protocol+"//"+mbi.host;
var mbi=mbi.protocol+"//"+mbi.host+mbi.pathname;
if(scriptNo==1){oBC=document.all.tags("BASE");if(oBC && oBC.length) if(oBC[0].href) mbi=oBC[0].href;}
while (mbi.search(/\\/)>-1) mbi=mbi.replace("\\","/");
mbi=mbi.substring(0,mbi.lastIndexOf("/")+1);
var e=document.getElementsByTagName("SCRIPT");
for (var i=0;i<e.length;i++){if (e[i].src){if (e[i].src.indexOf(awmMenuName+".js")!=-1){xt=e[i].src.split("/");if (xt[xt.length-1]==awmMenuName+".js"){xt=e[i].src.substring(0,e[i].src. length-awmMenuName.length-3);if (e[i].src.indexOf("://")!=-1){mbi=xt;}else{if(xt.substring(0,1)=="/")m bi=mpa+xt; else mbi+=xt;}}}}}
while (mbi.search(/\/\.\//)>-1) {mbi=mbi.replace("/./","/");}
var awmMenuPath=mbi.substring(0,mbi.length-1);
while (awmMenuPath.search("'")>-1) {awmMenuPath=awmMenuPath.replace("'","'");}
document.write("<SCRIPT SRC='"+awmMenuPath+awmLibraryPath+"/awmlib"+scriptNo+".js'><\/SCRIPT>" );
var n=null;
awmzindex=1000;
}

var awmSubmenusFrame='';
var awmSubmenusFrameOffset;
var awmOptimize=0;
var awmUseTrs=0;
var awmSepr=["0","","",""];
function awmBuildMenu(){
if (awmSupported){
awmImagesColl=["main-button-tile.gif",99,28,"main-buttonOver-tile.gif" ,5,28,"main-button-left.gif",5,28,"main-buttonOver-left.gif",5,28,"mai n-button-right.gif",5,28,"main-buttonOver-right.gif",5,28];
awmCreateCSS(0,1,0,n,n,n,n,n,'none',0,'#000000',0,0);
awmCreateCSS(1,2,2,'#000000',n,0,'bold 10px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(0,2,2,'#FFFFFF',n,1,'bold 10px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(1,2,2,'#000000',n,0,'bold 10px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',0);
awmCreateCSS(0,2,2,'#FFFFFF',n,1,'bold 10px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',0);
awmCreateCSS(1,2,0,'#000000',n,0,'bold 10px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(0,2,0,'#FFFFFF',n,1,'bold 10px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',1);
var s0=awmCreateMenu(0,0,0,0,1,0,0,0,0,10,10,0,0,0,1,1,0,n,n,100,0,0,10,10 ,0);
it=s0.addItemWithImages(1,2,2," O nás ",n,n,"",n,n,n,3,3,3,n,n,n,"o_nas.html",n,n,n,"o_nas.html",n,0,0,2,2,3 ,3,4,5,5,0,0,0,0);
it=s0.addItemWithImages(3,4,4," Činnosť ",n,n,"",n,n,n,3,3,3,n,n,n,"",n,n,n,n,n,0,0,2,2,3,3,4,5,5,0,0,0,0);
var s1=it.addSubmenu(0,0,1,0,0,0,0,0,1,1,0,n,n,100,0,1,0);
it=s1.addItemWithImages(5,6,6," Štatistiky ",n,n,"",n,n,n,3,3,3,n,n,n,"../statistiky/statistiky.html",n,n,n,"../s tatistiky/statistiky.html",n,0,0,2,2,3,3,4,5,5,0,0,0,0);
it=s1.addItemWithImages(5,6,6," Zaujímavosti ",n,n,"",n,n,n,3,3,3,n,n,n,"zaujimavosti.html",n,n,n,"zaujimavosti.htm l",n,0,0,2,2,3,3,4,5,5,0,0,0,0);
it=s1.addItemWithImages(5,6,6," BP ",n,n,"",n,n,n,3,3,3,n,n,n,"bp.html",n,n,n,"bp.html",n,0,0,2,2,3,3,4,5 ,5,0,0,0,0);
it=s0.addItemWithImages(1,2,2," Kontakt ",n,n,"",n,n,n,3,3,3,n,n,n,"kontakt.html",n,n,n,"kontakt.html",n,0,0,2 ,2,3,3,4,5,5,0,0,0,0);
s0.pm.buildMenu();
}}
peta
Profil
marian_pd
odkazem na stranku bys neucpaval forum a meli bychom vsichni totez. forum zalamuje radky pridanim mezery.

ten cript sam o sobe nic nedela. je treba pridat dalsi scripty a samozrejme spustit zobrazeni menu.
cili
<script src=neco.js></script>
<script src=tento.js></script>
<script> awmBuildMenu()</script>
To neco.js musi obsahovat:
function awmCreateCSS
function awmCreateMenu
atd

Vaše odpověď

Mohlo by se hodit

Neumíte-li správně určit příčinu chyby, vkládejte odkazy na živé ukázky.
Užíváte-li nějakou cizí knihovnu, ukažte odpovídajícím, kde jste ji vzali.

Užitečné odkazy:

Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: