Foros del Web » Programando para Internet » Javascript »

Como Agrego un *.js a mi web con dreanweaver

Estas en el tema de Como Agrego un *.js a mi web con dreanweaver en el foro de Javascript en Foros del Web. Buenos días, tengo un pequeño inconveniente, resulta que hice un menu horizontal con el programa All Web Menus y compilándolo me queda como un archivo ...
  #1 (permalink)  
Antiguo 20/03/2008, 08:13
 
Fecha de Ingreso: marzo-2008
Mensajes: 5
Antigüedad: 16 años, 1 mes
Puntos: 0
Como Agrego un *.js a mi web con dreanweaver

Buenos días, tengo un pequeño inconveniente, resulta que hice un menu horizontal con el programa All Web Menus y compilándolo me queda como un archivo de nombre Menu.js.
Perfecto ahora no se como agregarlo a mi pagina web que estoy editando con Dreanweaver. intente ponerlo en el <body>.....</body> pero nada...preferentemente estoy tratando de ponerlo en una "capa" pq es mas fácil de acomodar en el espacio de la web. Espero si pueden ayudarme. Muchas gracias.saludos
  #2 (permalink)  
Antiguo 20/03/2008, 08:28
Avatar de JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Re: Como Agrego un *.js a mi web con dreanweaver

Hola Shifery. Bienvenido al foro.

En el código, pones entre <head> y </head>

Código:
<script type="text/javascript" src="Menu.js"></script>
Saludos,
  #3 (permalink)  
Antiguo 20/03/2008, 09:06
 
Fecha de Ingreso: marzo-2008
Mensajes: 5
Antigüedad: 16 años, 1 mes
Puntos: 0
Re: Como Agrego un *.js a mi web con dreanweaver

Ya lo intente, pero no funciona....
  #4 (permalink)  
Antiguo 20/03/2008, 09:30
Avatar de ElJavista
Colaborador
 
Fecha de Ingreso: marzo-2007
Ubicación: Lima Perú
Mensajes: 2.231
Antigüedad: 17 años, 1 mes
Puntos: 67
Re: Como Agrego un *.js a mi web con dreanweaver

Entonces publica una buena parte de tu codigo para que ver en qué estás fallando porque esa es la única forma de enlazar un código que está en un archivo aparte.
  #5 (permalink)  
Antiguo 20/03/2008, 09:55
 
Fecha de Ingreso: marzo-2008
Mensajes: 5
Antigüedad: 16 años, 1 mes
Puntos: 0
Re: Como Agrego un *.js a mi web con dreanweaver

GRacias por la ayuda
Este es el codigo de la web.....
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<style type="text/css">
<!--
.menu {font-family:Arial; font-weight:bold}

.menu a{
text-decoration:none;
color:black;
}
-->
</style>
<style>

#divMenu {font-family:arial,helvetica; font-size:12pt; font-weight:bold}
#divMenu a{text-decoration:none;}
#divMenu a:hover{color:red;}
</style>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Vermouth con papa fritas y good show...</title>
<style type="text/css">
<!--
body,td,th {
color: #F0F0F0;
}
body {
background-color: #000000;
}
#Layer1 {
position:absolute;
width:678px;
height:99px;
z-index:1;
left: 26px;
top: 30px;
}
#Layer2 {
position:absolute;
width:947px;
height:33px;
z-index:2;
left: 14px;
top: 199px;
}
#Layer3 {
position:absolute;
width:216px;
height:127px;
z-index:3;
left: 697px;
top: 21px;
}
.Estilo3 {color: #0000FF}
#Layer4 {
position:absolute;
width:371px;
height:182px;
z-index:4;
left: 45px;
top: 248px;
background-image: url(Imagenes/Collage.JPG);
}
#Layer5 {
position:absolute;
width:309px;
height:33px;
z-index:4;
left: 311px;
top: 269px;
}
#Layer6 {
position:absolute;
width:200px;
height:329px;
z-index:5;
left: 19px;
top: 260px;
}
#Layer7 {
position:absolute;
width:153px;
height:346px;
z-index:5;
left: 15px;
top: 250px;
}
.google-src-text {display: none !important}
#Layer8 {
position:absolute;
width:517px;
height:121px;
z-index:5;
left: 270px;
top: 26px;
}
#Layer9 {
position:absolute;
width:175px;
height:161px;
z-index:6;
left: 223px;
top: 449px;
}
#Layer10 {
position:absolute;
width:798px;
height:1483px;
z-index:7;
left: 164px;
top: 438px;
}
#Layer11 {
position:absolute;
width:173px;
height:163px;
z-index:1;
left: 283px;
top: 12px;
}
#Layer12 {
position:absolute;
width:186px;
height:143px;
z-index:2;
left: 528px;
top: 13px;
}
-->
</style>
<script>
<!-- Beginning of JavaScript -
var i_strength=0
var i_color=0
var max_strength=400
var shadowcolor=new Array()
shadowcolor[0]="FFFFFF"
shadowcolor[1]="EEEEEE"
shadowcolor[2]="DDDDDD"
shadowcolor[3]="CCCCCC"
shadowcolor[4]="BBBBBB"
shadowcolor[5]="AAAAAA"
shadowcolor[6]="999999"
shadowcolor[7]="888888"
shadowcolor[8]="777777"
shadowcolor[9]="666666"
shadowcolor[10]="555555"
shadowcolor[11]="444444"
shadowcolor[12]="333333"
shadowcolor[13]="222222"
shadowcolor[14]="111111"
shadowcolor[15]="000000"
shadowcolor[16]="000000"
shadowcolor[17]="000000"
shadowcolor[18]="000000"
shadowcolor[19]="000000"
shadowcolor[20]="000000"
shadowcolor[21]="000000"
shadowcolor[22]="000000"
shadowcolor[23]="000000"
shadowcolor[24]="000000"
var timer
var speed=20
var thisobj


function stopfilter(thisdiv){
if (document.all) {
i_strength=0
i_color=0
clearTimeout(timer)
thisobj=thisdiv
thisobj.style.filter=" "
}
}


function startfilter(thisdiv){
if (document.all) {
i_strength=0
i_color=0
clearTimeout(timer)
thisobj=thisdiv
morefilter()
}
}

function morefilter(){
if (i_strength <=max_strength) {
thisobj.style.filter="dropShadow(color="+shadowcol or[i_color]+", offx="+i_strength+",offy=0)"
i_strength=i_strength+20
i_color++
timer = setTimeout("morefilter()",speed)
}
else {
clearTimeout(timer)
lessfilter()
}
}

function lessfilter(){
if (i_strength >=0) {
thisobj.style.filter="dropShadow(color="+shadowcol or[i_color]+",offx="+i_strength+",offy=0)"
i_strength=i_strength-20
i_color--
timer = setTimeout("lessfilter()",speed)
}
else {
clearTimeout(timer)
makepause()
}
}

function makepause(){
timer = setTimeout("morefilter()",1000)
}

var isNav = (navigator.appName.indexOf("Netscape")!=-1)
var colors = new Array("FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF" ,"FFFFFF","FFFFFF","F9F9F9","F1F1F1","E9E9E9","E1E 1E1","D9D9D9","D1D1D1","C9C9C9","C1C1C1","B9B9B9", "B1B1B1","A9A9A9","A1A1A1","999999","919191","8989 89","818181","797979","717171","696969","616161"," 595959","515151","494949","414141","393939","31313 1","292929","212121","191919","111111","090909","0 00000")
var i = -37
var msg = 0



var linkto = new Array()
linkto[0]="Home"
linkto[1]="Animator"
linkto[2]="Multimedia"
linkto[3]="Platypus Web Builder"
linkto[4]="Draw Magic"
linkto[5]="Antechinus C# Editor"
linkto[6]="JavaScript"
linkto[7]="Media Editor"
linkto[8]="Email C Point"

function startStrobe(msgnum)
{msg=msgnum
strobeEffect(msg,-37)}

function strobeEffect(msgnum,i)
{msg=msgnum
if (i < 38)
{starttable = "<table width=200><td><center><font color=" + colors[Math.abs(i)] + " size=+2>"
endtable = "</font></a></center></td></table>"
fulltable = starttable + linkto[msg] + endtable
j = i + 1
if(isNav)
{document.object0.document.write(fulltable)
document.object0.document.close()}
else {object0.innerHTML = fulltable}
}
else {return false}
setTimeout("strobeEffect(msg,j)",20)
}

<!--
//var d = (navigator.userAgent.indexOf("MSIE 5")>-1) ;

if (parent && parent.gal_main) parent.gal_main.location='online/?station=101';

var d =(parseInt(navigator.appVersion)>=4 && navigator.appName=="Microsoft Internet Explorer");

items=9 ;
fade_increment = new Array(items) ;
fade_present = new Array(items) ;
currentbranch=-1;
colordepth = new Array(10);
colordepth[0]="#707070";
colordepth[1]="#808080";
colordepth[2]="#909090";
colordepth[3]="#a0a0a0";
colordepth[4]="#b0b0b0";
colordepth[5]="#c0c0d0";
colordepth[6]="#d0d0d0";
colordepth[7]="#e0e0e0";
colordepth[8]="#f0f0f0";
colordepth[10]="#ffffff";
started=false ;
for (i=0;i<items;i++) {
fade_increment[i]=0;
fade_present[i]=0;
}

function s(item,statustext) {
window.status=(statustext?statustext:' ');
if (started && d) {
var curr=item;
fade_increment[curr]=(statustext?40:-7);
}
return true;
}

function fadeloop() {
rep="";
for (i=0;i<fade_increment.length;i++) {
rep+=" "+fade_present[i];
fade_present[i]+=fade_increment[i] ;
if (fade_present[i]>=100) {
fade_present[i]=100;
fade_increment[i]=0;
}
else if (fade_present[i]<=0) {
fade_present[i]=0;
fade_increment[i]=0;
}
if (document.all['i'+i]) document.all['i'+i].style.color=colordepth[Math.round(fade_present[i]/10)];
}
setTimeout('fadeloop()',50) ;
}

function tog(b) {
if (d) {
if (currentbranch==b) {
document.all["s"+b].style.display='none';
currentbranch=-1;
} else {
if (currentbranch>-1) document.all["s"+currentbranch].style.display='none';
document.all["s"+b].style.display='block';
currentbranch=b;
}
}
}

function positionitems() {
for (a=0;a<items;a++) {
document.all["t"+a].style.top=a*10;
}
}

function start() {
// positionitems();
started=true ;
if (d) fadeloop() ;
}

function dropMenu() {
speed=5;
topdistance=100;
items=9;
y=-50;
ob=1;
if (navigator.appName == "Netscape") {
v=".top=",dS="document.",sD="";
}
else {
v=".pixelTop=",dS="",sD=".style";
}
}
function scrollItems() {
if (ob<items+1) {
objectX="object"+ob; y+=10; eval(dS + objectX + sD + v + y);
if (y<topdistance) setTimeout("scrollItems()",speed);
else y=-50, topdistance+=40, ob+=1, setTimeout("scrollItems()",speed);
}
}
// End -->
</SCRIPT>
</head>
<body onload="escrolea()" bodyonLoad="dropMenu(), scrollItems(), start();" BGCOLOR="Black" TEXT="white" >
</body>
</html>
  #6 (permalink)  
Antiguo 20/03/2008, 09:56
 
Fecha de Ingreso: marzo-2008
Mensajes: 5
Antigüedad: 16 años, 1 mes
Puntos: 0
Re: Como Agrego un *.js a mi web con dreanweaver

ESTE ES EL CÓDIGO DEL MENU...GRACIAS DE NUEVO

//----------DHTML Menu Created using AllWebMenus PRO LinkBack ver 4.2-#656---------------
//D:\WEB DVD\menu.awm
awmNS6OffsetX=-5;
awmNS6OffsetY=1;
awmRTLSupport=1;
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('Saf ari')>-1)?7:(nua.indexOf('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(o BC && 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)=="/")mbi=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;
document.write('</table>');
var awmSepr=["0","","","","90","#808080","","3"];
function awmBuildMenu(){
if (awmSupported){
awmImagesColl=["main-header.gif",8,41,"main-footer.gif",8,41,"main-button-tile.gif",8,41,"main-buttonOver-tile.gif",12,41,"main-button-left.gif",8,41,"main-buttonOver-left.gif",11,41,"main-button-right.gif",8,41,"main-buttonOver-right.gif",11,41];
awmCreateCSS(1,2,1,'#FFFFFF',n,n,'14px sans-serif',n,'none',0,'#000000','0px 0px 0px 0',0);
awmCreateCSS(0,2,1,'#FFFFFF',n,n,'14px sans-serif',n,'none',0,'#000000','0px 0px 0px 0',0);
awmCreateCSS(0,1,0,n,n,n,n,n,'none',0,'#000000',0, 0);
awmCreateCSS(1,2,0,'#FFFFFF',n,2,'14px Times New Roman',n,'none',0,'#000000','0px 15px 0px 15',1);
awmCreateCSS(0,2,0,'#FFFFFF',n,3,'14px Verdana, Arial, Helvetica, sans-serif',n,'none',0,'#000000','0px 15px 0px 15',1);
awmCreateCSS(1,2,1,'#000000','#FFFFFF',n,'14px Times New Roman',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(0,2,1,'#FFFFFF','#7A96DF',n,'14px Verdana, Arial, Helvetica, sans-serif',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(1,2,1,'#000000','#FFFFFF',n,'14px sans-serif',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(0,2,1,'#FFFFFF','#7A96DF',n,'14px sans-serif',n,'none',0,'#000000','0px 0px 0px 0',1);
var s0=awmCreateMenu(0,0,0,0,1,0,0,0,5,10,10,0,1,2,0,0 ,1,n,n,100,0,0,10,10,0);
it=s0.addItemWithImages(0,1,1,"","","","",0,0,0,3, 3,3,n,n,n,"",n,n,n,n,n,0,0,0,n,n,n,n,n,n,0,0,0,0);
it=s0.addItemWithImages(3,4,4,"Home",n,n,"",n,n,n, 3,3,3,n,n,n,"Home.html",n,n,n,"Home.html",n,0,0,2, 4,5,5,6,7,7,1,1,1,0);
it=s0.addItem(5,6,6," Solo Cine ",n,n,"","solocine.html",n,n,n,"solocine.html",n,0 ,0,2,0);
it=s0.addItem(7,8,8," Catalogos, Pedidos y Contacto ",n,n,"","propeco.html",n,n,n,"propeco.html",n,0,0 ,2,1);
it=s0.addItemWithImages(3,4,4,"Zona Series",n,n,"",n,n,n,3,3,3,n,n,n,"zonaseries.html" ,n,n,n,"zonaseries.html",n,0,0,2,4,5,5,6,7,7,1,1,1 ,0);
it=s0.addItemWithImages(3,4,4,"Zona Juegos",n,n,"",n,n,n,3,3,3,n,n,n,"zonajuegos.html" ,n,n,n,"zonajuegos.html",n,0,0,2,4,5,5,6,7,7,1,1,1 ,0);
it=s0.addItemWithImages(0,1,1,"","","","",1,1,1,3, 3,3,n,n,n,"",n,n,n,n,n,0,0,0,n,n,n,n,n,n,0,0,0,0);
s0.pm.buildMenu();
}}
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:51.