Click here to Skip to main content
15,910,980 members
Home / Discussions / Web Development
   

Web Development

 
Questionhtml file control on Mac Firefox Pin
Saetan18-Aug-08 22:03
Saetan18-Aug-08 22:03 
AnswerRe: html file control on Mac Firefox Pin
Johnny ²18-Aug-08 22:58
Johnny ²18-Aug-08 22:58 
QuestionWhat are the different ways of sending a form to an email Pin
Christopher Clarke18-Aug-08 11:52
Christopher Clarke18-Aug-08 11:52 
AnswerRe: What are the different ways of sending a form to an email Pin
Perspx18-Aug-08 12:02
Perspx18-Aug-08 12:02 
AnswerRe: What are the different ways of sending a form to an email Pin
Manas Bhardwaj18-Aug-08 12:15
professionalManas Bhardwaj18-Aug-08 12:15 
AnswerRe: What are the different ways of sending a form to an email Pin
User 171649218-Aug-08 12:25
professionalUser 171649218-Aug-08 12:25 
GeneralRe: What are the different ways of sending a form to an email Pin
Christopher Clarke18-Aug-08 12:34
Christopher Clarke18-Aug-08 12:34 
QuestionFirefox Dropdown Menu Problem Pin
dragon1011318-Aug-08 6:19
dragon1011318-Aug-08 6:19 
Hi all, this is my first message here so i hope i can rely on some of you people to help...

My problem is that i'm working on a website that has drop down menus written in javascript. Now these menus work properly on IE and Netscape, but when i try to view the site on firefox, the table cell that holds the "hidden" menu is at a greater height (the height of the cell + the height of the drop down menu). And the menu appears within the that cell when hovered over and disapears when you leave it. But the menu is never hidden and the table cell remains the same height. Its not acting like a proper drop down menu, but instead its like it shows the links when hovered over. Here is the html code and the Javascript code that i'm using...

html:
(For the row that has the menu only)
<tr><td width="145px"></td><td width="0px" class="test" height="0" id=0 onmouseout=btnTimer() onmouseover=showLayer("Menu0",'0')>
<a class="menu_special" href="products.html">
drop_down
<img src="images/arrowdown.gif" border="0" width="10" height="10" alt="">
<div id=Menu0 style="visibility:hidden;">
<table bgcolor=#ffffff cellpadding=5 style="border-collapse: collapse;">
<tr height=0 onmouseout=menuOut(this,'#ffffff') onmouseover=menuOver(this,'#ffffff')>
<td align=left width="75px"><a class="menu_special" href="#1">test1</a></td></tr>
<tr height=0 onmouseout=menuOut(this,'#ffffff') onmouseover=menuOver(this,'#ffffff')>
<td align=left width="75px"><a class="menu_special" href="#3">test2</a></td></tr>
<tr height=0 onmouseout=menuOut(this,'#ffffff') onmouseover=menuOver(this,'#ffffff')>
<td align=left width="75px"><a class="menu_special" href="#3">test3</a></td></tr>
<table>
<div>
<a></td></tr>

Javascript code:
window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var IE4 = (bName == "Microsoft Internet Explorer" &amp;&amp; bVer &gt;= 4);
var menuActive = 0;
var menuOn = 0;
var onLayer;
var timeOn = null;

function showLayer(layerName,aa){
var x =document.getElementById(aa);
var tt =findPosX(x);
var ww =findPosY(x)+20;
if (timeOn != null) {
clearTimeout(timeOn);
hideLayer(onLayer);
}
if (IE4) {
var layers = eval('document.all["'+layerName+'"].style');
layers.left = tt;
eval('document.all["'+layerName+'"].style.visibility="visible"');
}
else {
if(document.getElementById){
var elementRef = document.getElementById(layerName);
if((elementRef.style)&amp;&amp; (elementRef.style.visibility!=null)){
elementRef.style.visibility = 'visible';
elementRef.style.left = tt;
elementRef.style.top = ww;
}
}
}
onLayer = layerName
}

function hideLayer(layerName){
if (menuActive == 0)
{
if (IE4){
eval('document.all["'+layerName+'"].style.visibility="hidden"');
}
else{
if(document.getElementById){
var elementRef = document.getElementById(layerName);
if((elementRef.style)&amp;&amp; (elementRef.style.visibility!=null)){
elementRef.style.visibility = 'hidden';
}
}
}
}
}

function btnTimer() {
timeOn = setTimeout("btnOut()",50)
}

function btnOut(layerName){
if (menuActive == 0){
hideLayer(onLayer)
}
}

var item;
function menuOver(itemName,ocolor){
item=itemName;
itemName.style.backgroundColor = ocolor; //background color change on mouse over
clearTimeout(timeOn);
menuActive = 1
}

function menuOut(itemName,ocolor){
if(item)
itemName.style.backgroundColor = ocolor;
menuActive = 0
timeOn = setTimeout("hideLayer(onLayer)", 50)
}

function findPosX(obj)
{
var curleft = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (obj.x)
curleft += obj.x;
return curleft;
}

function findPosY(obj)
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
return curtop;
}

Any Help Would be appreciated

Thanks
AnswerRe: Firefox Dropdown Menu Problem Pin
Shog918-Aug-08 6:43
sitebuilderShog918-Aug-08 6:43 
GeneralRe: Firefox Dropdown Menu Problem Pin
Perspx18-Aug-08 7:15
Perspx18-Aug-08 7:15 
GeneralRe: Firefox Dropdown Menu Problem Pin
dragon1011318-Aug-08 9:41
dragon1011318-Aug-08 9:41 
GeneralRe: Firefox Dropdown Menu Problem Pin
Shog918-Aug-08 9:53
sitebuilderShog918-Aug-08 9:53 
QuestionHTTPWebRequest Pin
Aleemulhaq17-Aug-08 22:59
Aleemulhaq17-Aug-08 22:59 
GeneralRe: HTTPWebRequest Pin
Perspx18-Aug-08 3:58
Perspx18-Aug-08 3:58 
Questionajaxcontrolltoolkit is not working Pin
DeepakRohilla1317-Aug-08 11:45
professionalDeepakRohilla1317-Aug-08 11:45 
AnswerRe: ajaxcontrolltoolkit is not working PinPopular
NeverHeardOfMe17-Aug-08 12:59
NeverHeardOfMe17-Aug-08 12:59 
AnswerThe universal two-step solution Pin
Shog917-Aug-08 15:55
sitebuilderShog917-Aug-08 15:55 
Questionhelp with img rollovers [modified] Pin
jumbojs17-Aug-08 9:19
jumbojs17-Aug-08 9:19 
QuestionSample ASP.Net Application Pin
farrukhj16-Aug-08 22:28
farrukhj16-Aug-08 22:28 
AnswerRe: Sample ASP.Net Application Pin
Yusuf16-Aug-08 23:47
Yusuf16-Aug-08 23:47 
QuestionCreating Animations Pin
BRIMID16-Aug-08 13:45
BRIMID16-Aug-08 13:45 
AnswerRe: Creating Animations Pin
Shog916-Aug-08 16:27
sitebuilderShog916-Aug-08 16:27 
QuestionSending a form to your email address Pin
Christopher Clarke16-Aug-08 11:34
Christopher Clarke16-Aug-08 11:34 
AnswerRe: Sending a form to your email address Pin
Manas Bhardwaj16-Aug-08 11:52
professionalManas Bhardwaj16-Aug-08 11:52 
QuestionRe: Sending a form to your email address Pin
Christopher Clarke16-Aug-08 12:02
Christopher Clarke16-Aug-08 12:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.