Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Rolldown menu no funca en IE

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish
View previous topic :: View next topic  
Author Message
LakjaSupay
Smarty n00b


Joined: 19 Aug 2008
Posts: 4

PostPosted: Tue Aug 19, 2008 2:54 pm    Post subject: Rolldown menu no funca en IE Reply with quote

Hola, estoy armando un menu de tipo rolldown, funciona bien en FF, pero no en IE, lo raro es q si saco el codigo del menu fuera del archivo index.tpl y lo pego en index.php, IE si reconoce el codigo y funciona bien
este es mi codigo:
index.php
session_start();
include_once("config.cemla.php");
$smarty->display("index.tpl");

index.tpl
<html>
<head>
<link rel='StyleSheet' type='text/css' href='standard.css' />
{php}
global $xajax;
{/php}
<script src="classes/js/topMenuNav.js" type="text/javascript"></script>
</head>
<body onload="xajax_loadIndexModules();">
<ul id="topMenuMainNav">
<li><a href="#">Percoidei</a>
<ul>
<li><a href="#">Remoras</a></li>
<li><a href="#">Tilefishes</a></li>
<li><a href="#">Bluefishes</a></li>
<li><a href="#">Tigerfishes</a></li>
</ul>
</li>

<li><a href="#">Anabantoidei</a>
<ul>
<li><a href="#">Climbing perches</a></li>
<li><a href="#">Labyrinthfishes</a></li>
<li><a href="#">Kissing gouramis</a></li>
<li><a href="#">Pike-heads</a></li>
<li><a href="#">Giant gouramis</a></li>
</ul>
</li>
</ul>
</body>
</html>

standard.css
#topMenuMainNav, #topMenuMainNav ul{
padding: 0;
margin: 0;
list-style: none;
}
#topMenuMainNav a{
display: block;
width: 9em;
}
#topMenuMainNav li{
float: left;
clear:none;
width: 9em;
}
#topMenuMainNav li ul {
position: absolute;
width: 9em;
left: -99em;
}
#topMenuMainNav li:hover ul, #topMenuMainNav li.sfhover ul {
left: auto;
}

topMenuNav.js
sfHover = function() {
var sfEls = document.getElementById("topMenuMainNav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

Puede alguien indicarme donde esta mi error?, o is es un bug de IE, como solucionarlo?

grax


Last edited by LakjaSupay on Tue Aug 19, 2008 3:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
Spielberg
Smarty Rookie


Joined: 20 Apr 2007
Posts: 6
Location: Spain

PostPosted: Fri Aug 29, 2008 4:07 pm    Post subject: Este menu me suena Reply with quote

Esa función de javascript es para que los explorer inferiores al 6 hagan "caso" de la subclase :hover, ya que sólo hace caso cuando se trata de enlaces. Me parece que esa no es la última versión, hay otra nueva en la web que va mejor, de todas maneras, prueba a copiar el codigo directamente en la tpl y sino indica que error te da.

Javi

--------------
www.inmonet.net
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP