Foros del Web » Programando para Internet » Javascript »

Tunait Ayuda Urgente!!!!!!!!!!!!!!

Estas en el tema de Tunait Ayuda Urgente!!!!!!!!!!!!!! en el foro de Javascript en Foros del Web. Sabs utilice el script para crear el menu, pero el problema es que los enlaces no funcionan; cuando hago click no me manda a ningun ...
  #1 (permalink)  
Antiguo 30/06/2009, 18:31
Avatar de zeuzft  
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 10 meses
Puntos: 2
Exclamación Tunait Ayuda Urgente!!!!!!!!!!!!!!

Sabs utilice el script para crear el menu, pero el problema es que los enlaces no funcionan; cuando hago click no me manda a ningun lado; aqui te dejo el codigo generado por la pagina tunait.:
<script........>
.......................
posArriba = 50
posIzquierda = 0

var anchoOp = 152
var menuPrin =5

var tunIex=navigator.appName=="Microsoft Internet Explorer"?true:false;
var tiempo
function menucete(ide,num){ // crea submenus principales (capa)
espan = document.createElement("span")
document.getElementById('Men_'+num).appendChild(es pan)
espan.id=ide.toLowerCase(ide)+'_'+num
espan.className="subMe"
espan.cierra = true
espan.tiempo = 0
espan.style.top="-1px"
espan.onmouseout=function(){
setTimeout('ocultaP()',1000)
}
with(espan.style){
width = anchoOp+"px"
}
posIzquierda += anchoOp
construye(ide+'_'+num,eval('Op_'+num).subO)
}
function seccion(tex,enl,dstn,subO){
this.tex = tex
this.enl = enl
this.dstn = dstn
this.subO = subO
/*this.dir = dir
this.an = an*/
}
var Op_0 = new seccion("Inicio",'index.php?menu=','_self',0);
var Op_1 = new seccion("Organización",null,null,3)
var Op_1_0=new seccion('Documentos de Gestión','index.php?menu=Documentosgestion.php','_ self',0)
var Op_1_1=new seccion('Gestión Municipal',null,null,4)
var Op_1_1_0=new seccion('Proyectos de Inversión','index.php?menu=contruccion.php','_self ',0)
var Op_1_1_1=new seccion('Cooperación Internacional','index.php?menu=contruccion.php','_ self',0)
var Op_1_1_2=new seccion('Convenios Institucionales','index.php?menu=contruccion.php', '_self',0)
var Op_1_1_3=new seccion('Programa Vaso de Leche','index.php?menu=contruccion.php','_self',0)
var Op_1_2=new seccion('Distribución',null,null,4)
var Op_1_2_0=new seccion('Directorio Municipal','index.php?menu=DirectorioMunicipal.php ','_self',0)
var Op_1_2_1=new seccion('Funcionarios','index.php?menu=Funcionario s.php','_self',0)
var Op_1_2_2=new seccion('Gerencias',null,null,8)
var Op_1_2_2_0=new seccion('Gerencia de Secretaría General','index.php?menu=GerenciaSG.php','_self',0 )
var Op_1_2_2_1=new seccion('Gerencia Municipal','index.php?menu=GerenciaM.php','_self', 0)
var Op_1_2_2_2=new seccion('Gerencia de Administración','index.php?menu=GerenciaA.php','_s elf',0)
var Op_1_2_2_3=new seccion('Gerencia de Rentas','index.php?menu=GerenciaR.php','_self',0)
var Op_1_2_2_4=new seccion('Gerencia de Desarrollo Urbano','index.php?menu=GerenciaDU.php','_self',0)
var Op_1_2_2_5=new seccion('Gerencia de Asesoría Jurí*dica y Procuradorí*a','index.php?menu=GAJ.php','_self',0)
var Op_1_2_2_6=new seccion('Gerencia de P.P.C.T.I.','index.php?menu=GPP.php','_self',0)
var Op_1_2_2_7=new seccion('Gerencia de Servicios Públicos','index.php?menu=GSP.php','_self',0)
var Op_1_2_3=new seccion('Regidores','index.php?menu=Regidores.php' ,'_self',0)
var Op_2 = new seccion("Municipalidad",'index.php?menu=municipali dad.php','_self',0)
var Op_3 = new seccion("Transparencia",null,null,14)
var Op_3_0=new seccion('Informacion Financiera','index.php?menu=InformacionFinanciera. php','_self',0)
var Op_3_1=new seccion('Informacion Presupuestal','index.php?menu=InformacionPresupues tal.php','_self',0)
var Op_3_2=new seccion('Ley de Publicidad del Sector Publico','index.php?menu=LeyPublicidad.php','_self ',0)
var Op_3_3=new seccion('Ley de Transparencia','index.php?menu=LeyTransparencia.ph p','_self',0)
var Op_3_4=new seccion('Medidas de Austeridad','index.php?menu=MedidasAusteridad.php' ,'_self',0)
var Op_3_5=new seccion('Adquisiciones 2007','index.php?menu=Adquisiciones2007.php','_sel f',0)
var Op_3_6=new seccion('Adquisiciones 2008','index.php?menu=Adquisiciones2008.php','_sel f',0)
var Op_3_7=new seccion('Nuevo Tupa 2008','index.php?menu=NuevoTupa2008.php','_self',0 )
var Op_3_8=new seccion('Ordenanzas Municipales','index.php?menu=OrdenanzasMunicipales .php','_self',0)
var Op_3_9=new seccion('Plan Anual de Adquisiciones','index.php?menu=PlanAnual.php','_se lf',0)
var Op_3_10=new seccion('Plan Operativo Institucional 2008','index.php?menu=PlanOperativo2008.php','_sel f',0)
var Op_3_11=new seccion('Ppto Participativo 2008','index.php?menu=PptoParticipativo2008.php',' _self',0)
var Op_3_12=new seccion('Resoluciones de Alcaldia','index.php?menu=ResolucionesAlcaldia.php ','_self',0)
var Op_3_13=new seccion('Resultados de la Ev. de Doc. Marzo 2008','index.php?menu=ResultadosEvaluacion.php','_ self',0)
var Op_4 = new seccion("Intranet",'index.php?menu=intranet.php',' _self',0)

var anchoTotal = 780;
if(!tunIex){anchoTotal += menuPrin*3}
function menPrin(){ //crea menu principal
menuP=document.createElement('div')
tablaP = document.createElement('table')
tablaP.border=1
menuP.appendChild(tablaP)
cuerpoTabla = document.createElement('tbody')
tablaP.appendChild(cuerpoTabla)
fila=document.createElement('tr')
fila.id ='filita'
cuerpoTabla.appendChild(fila)
tablaP.cellSpacing='0'
tablaP.className='celda'
document.getElementById('tunMenu').appendChild(men uP)
menuP.className = "subMeP"
menuP.id = 'MenuPrincipal'
menuP.style.visibility='hidden'
menuP.style.position="absolute"
menuP.style.width = anchoTotal +"px"
for(s=0; s<menuPrin; s++){ //crea botones principales
opcionP=document.createElement('div')
opcionP.className = "botonesP"
opcionP.style.width= anchoOp+'px'
document.getElementById('MenuPrincipal').appendChi ld(opcionP)
opcionP.id='Men_'+s
opcionP.onclick=function(){
}
celda = document.createElement('td')
document.getElementById('filita').appendChild(celd a)
celda.id='celda_' + s
celda.appendChild(opcionP)
celda.className='celda'
if(eval('Op_'+s).subO > 0){
menucete('Op',s)
}
}
}

var subs=new Array(0)
function construye(ide,num){
subOp=0
for(m=0; m<num; m++){
opchon = eval(ide +'_' + m)
caja = document.createElement("div")
boton = document.createElement("div")
boton.appendChild(caja)
caja.className='Caj'
document.getElementById(ide.toLowerCase()).appendC hild(boton)
identi = ide.toLowerCase() + "_" + m
caja.id=identi+'caja'
boton.id = identi
boton.className = 'botones'
document.getElementById(identi).appendChild(docume nt.createTextNode(opchon.tex))
salto = document.createElement('br')
boton.onmouseover=function(){
this.className='botonesHover'
this.parentNode.cierra=false
muestra(this.parentNode.id)
}
boton.onmouseout=function(){
this.className='botones'
this.parentNode.cierra = true
}
if(opchon.subO > 0){
subs[subs.length] = identi
subOp++
boton.style.cursor='default'
}
else{
boton.style.cursor=cur
if(opchon.enl!=null){
boton.enl=opchon.enl
boton.dstn=opchon.dstn
boton.onclick=function(){
enlaces(this.enl,this.dstn)
}
}
}
}
if(subs.length>0){construyeSub(subs)}
}
function construye2(ide,num){
for(m=0; m<num; m++){
opchon = eval(ide +'_' + m)
caja = document.createElement("div")
boton = document.createElement("div")
boton.appendChild(caja)
caja.className='Caj'
document.getElementById(ide.toLowerCase()+'_sub'). appendChild(boton)
identi = ide.toLowerCase() + "_" + m
boton.id = identi
caja.id=identi+'caja'
boton.className = 'botones'
document.getElementById(identi).appendChild(docume nt.createTextNode(opchon.tex))
salto = document.createElement('br')
boton.onmouseover=function(){this.className='boton esHover'}
boton.onmouseout=function(){this.className='botone s'}
if(opchon.subO > 0){
subs[subs.length] = identi
subOp++
boton.style.cursor='default'
}
else{
boton.style.cursor=cur
if(opchon.enl!=null){
boton.enl=opchon.enl
boton.dstn=opchon.dstn
boton.onclick=function(){
enlaces(this.enl,this.dstn)
}
}
}
}
}
var cur=tunIex?'hand':'pointer'
function construyeSub(lista){
largo = subs.length
for(t=0; t<subs.length;t++){
if(subs[t] != null){
obj = subs[t].charAt(0).toUpperCase() + subs[t].substr(1)
obj2 = subs[t].charAt(0).toUpperCase() + subs[t].substring(1,subs[t].length-2)
espan = document.createElement("span")
document.getElementById(subs[t]+'caja').appendChild(espan)
espan.id=subs[t]+'_sub'
espan.className="subMe"
espan.cierra = true
document.getElementById(subs[t]).onmouseover=function(){
this.className = 'botonesHover'
this.parentNode.cierra=false
muestra(this.id+'_sub')
}
document.getElementById(subs[t]).onmouseout=function(){
this.className = 'botones'
this.parentNode.cierra = true
oculta(this.id+'_sub')
}
espan.onclick=function(){
}
if(eval(obj2).an){An=eval(obj2).an}
else{An=anchoOp}
if(eval(obj).an){An2=eval(obj).an}
else{An2=anchoOp}
if(eval(obj).dir=='iz')
{pIz=-(An2-20)+"px"}
else{pIz=(An-20)+"px";}

with(espan.style){
position="absolute"
width = An2+"px"
left= pIz
visibility = 'hidden'
}
construye2(obj,eval(obj).subO)
subs[t] = null
}
}
}
function enlaces(enl,dstn){
if(dstn != null && dstn.toLowerCase() == 'nueva'){
window.open(enl)
}
else if(dstn==null){
location.href=enl
}
else{
eval(dstn+'.location.href='+enl)
}
}
function muestra(cual){
document.getElementById(cual).style.visibility='vi sible'
}
function oculta(cual){
document.getElementById(cual).style.visibility='hi dden'
}

function ocultaP(){............}
</script>
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 16:05.