javascript works in every browser but IE on PC

  • Digitelle
  • Graduate
  • Graduate
  • User avatar
  • Posts: 122
  • Loc: BRKLYN-NY

Post 3+ Months Ago

I have added a javascript rollover feature, so that when the user rolls over a flag, the name of the language appears below the row of flags. Then dissapears on mouse out.

This works in
Safari
Netscape (mac PC
IE (mac)
Firefox (mac PC)
Mozilla (mac)


but not IE or MSN on the PC

here is a link to the page

http://www.quintessenceproject.com/index2.php

here is the code

Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>The Quintessence Project</title>

<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="/css/quintessence.css" rel="stylesheet" type="text/css">

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible': (v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>

</head>
<body>

<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=368031;
var sc_partition=1;
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/free_hit_counter.html" target="_blank"><img src="http://c2.statcounter.com/counter.php?sc_project=368031&amp;java=0" border="0"></a> </noscript>
<!-- End of StatCounter Code -->

<div id="enter_fr" style="position:fixed; left:47%; top: 200px; visibility: hidden;"><h1>Français</h1></div>
<div id="enter_en" style="position:fixed; left:47%; top: 200px; visibility: hidden;"><h1>English</h1></div>
<div id="enter_sp" style="position:fixed; left:47%; top: 200px; visibility: hidden;">Español</div>
<div id="enter_it" style="position:fixed; left:47%; top: 200px; visibility: hidden;">Italiano</div>
<div id="enter_ge" style="position:fixed; left:47%; top: 200px; visibility: hidden;">Deutsche</div>
<div id="enter_ch" style="position:fixed; left:47%; top: 200px; visibility: hidden;">CHINESE</div>
<div id="enter_jp" style="position:fixed; left:47%; top: 200px; visibility: hidden;">JAPANESE</div>


<table valign="center" align="center">
<tr>
<td>
<img src="/images/quint-logo.jpg">
</td>
</tr>
<table valign="center" align="center" cellspacing="0" cellpadding="10">
<tr>
<td><a href="/index2.php?choose_language=fr"><img src="/images/flags/french.gif" onMouseOver="MM_showHideLayers('enter_fr','','show')" onMouseOut="MM_showHideLayers('enter_fr','','hide')"></a>
</td>
<td><a href="/index2.php?choose_language=en"><img src="/images/flags/english.gif" onMouseOver="MM_showHideLayers('enter_en','','show')" onMouseOut="MM_showHideLayers('enter_en','','hide')"></a>
</td>
<td>
<img src="/images/flags/italian.gif">
</td>
<td>
<img src="/images/flags/german.gif">
</td>
<td>
<img src="/images/flags/japanese.gif">
</td>
<td>
<img src="/images/flags/chinese.gif">
</td>
</tr>
</table>
</table>
</body>
</html>


What the hell do I do to fix it for IE?

thanks
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

The Javascript is working fine. The problem is with "position:fixed".
Code: [ Select ]
<div id="enter_fr" style="position:fixed; left:47%; top: 200px; visibility: hidden;"><h1>Français</h1></div>


IE doesn't seem to like it,
http://www.w3schools.com/css/pr_class_position.asp
An example fix,
http://devnull.tagsoup.com/fixed/
  • Digitelle
  • Graduate
  • Graduate
  • User avatar
  • Posts: 122
  • Loc: BRKLYN-NY

Post 3+ Months Ago

well duh!

thanks, I should have realized, I simply replaced fixed with absolute and it works the way it should.

thanks for helping the blind to see

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 59 guests
  • 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 post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.