/    Sign up×
Community /Pin to ProfileBookmark

Javascript and Flash problem

Hi, I’ve writen a web page with javascript, it works fine and without any problem. But when I embed a flash .swf file, javascript didn’t work in explorer (works fine in firefox).

Is I put a alert(“somthing”) in the function categoriaMousemove () it works. And if I deactivate categoriaMouseOut() with /**/, the categoriaMouseMove code works but with an offset in time.

here goes the code, I coldn’t find any post in www neither macromedia.com.

script rastro.js contains array values.

<html>
<head>
<title>El Rastro de Oportunidades</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<link href=”estils.css” rel=”stylesheet” type=”text/css”>
</head>
<script src=”rastro.js”>
</script>
<script>
function categoriaMouseMove(i)
{

casella = document.getElementById(“a”+i);
text = document.getElementById(“b”+i);
casella.style.background = aColors[i];
text.style.background = “#CCCCCC”;
e.innerHTML = aExp[i];

}

function categoriesMouseOut(i)
{
var a, b;

a = document.getElementById(“a”+i);
b = document.getElementById(“b”+i);
a.style.background =”white”;
b.style.background =”white”;
e.innerHTML = “&nbsp;”;

}

function ajustaPagina()
{

y = document.body.clientHeight – 430;
img1 = document.getElementById(“ajustador1”);
img2 = document.getElementById(“ajustador2”);
img1.height = y / 2;
img2.height = y / 2;

}
</script>
<!– saved from url=(0013)about:internet –>
<body onLoad=”ajustaPagina()” onResize=”ajustaPagina()”>
<table width=”750″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr><td bgcolor=”#CCCC99″><img src=”pixel.gif” width=”5″ height=”15″></td>
<td bgcolor=”f4f2e4″>
<table width=”730″ height=”50″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td colspan=”2″><img src=”pixel.gif” width=”10″ height=”10″></td>
</tr>
<tr bgcolor=”#FFFFFF”>
<td colspan=”2″ class=”cantellCategories”><div align=”center” class=”titol”><img src=”capsal.gif” width=”730″ height=”75″></div></td>
</tr>
<tr valign=”baseline” class=”telefons”>
<td width=”490″ class=”telefons”><img src=”pixel.gif” width=”10″ height=”20″>Informacion sobre: ANTIG&Uuml;EDADES 93.886.08.35 / 609.18.47.92</td>
<td width=”270″><div align=”right” class=”text”>Resto de art&iacute;culos: 608.84.12.23<img src=”pixel.gif” width=”10″ height=”20″></div></td>
</tr>
<tr>
<td><img src=”pixel.gif” width=”10″ height=”10″></td>
<td></td>
</tr>
</table>
<table width=”730″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td width=”178″ height=”153″><table width=”100%” border=”0″ cellpadding=”1″ cellspacing=”1″ bgcolor=”#FFFFFF” class=”cantellCategories”>
<tr>
<td id=”a1″><img src=”pixel.gif” width=”10″ height=”10″></td>
<td id=”b1″><a href=”articles.html?codi=1″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘1’)” onMouseOut=”categoriesMouseOut(‘1’)”>ANTIG&Uuml;EDADES</div>
</a></td>
</tr>
<tr>
<td id=”a2″><img src=”pixel.gif” width=”5″ height=”5″></td>
<td id=”b2″><a href=”articles.html?codi=2″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘2’)” onMouseOut=”categoriesMouseOut(‘2’)”>BRICOLAJE/HERRAMIENTAS</div>
</a></td>
</tr>
<tr>
<td id=”a3″><img src=”pixel.gif” width=”5″ height=”5″></td>
<td id=”b3″><a href=”articles.html?codi=3″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘3’)” onMouseOut=”categoriesMouseOut(‘3’)”>DECORACION</div>
</a></td>
</tr>
<tr>
<td id=”a4″><img src=”pixel.gif” width=”5″ height=”5″></td>
<td id=”b4″><a href=”articles.html?codi=4″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘4’)” onMouseOut=”categoriesMouseOut(‘4’)”>ELECTRODOMÉSTICOS</div>
</a></td>
</tr>
<tr>
<td id=”a5″><img src=”pixel.gif” width=”5″ height=”5″></td>
<td id=”b5″><a href=”articles.html?codi=5″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘5’)” onMouseOut=”categoriesMouseOut(‘5’)”>FOTOGRAFÍA</div>
</a></td>
</tr>
<tr>
<td id=”a6″><img src=”pixel.gif” width=”5″ height=”5″></td>
<td id=”b6″><a href=”articles.html?codi=6″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘6’)” onMouseOut=”categoriesMouseOut(‘6’)”>HOGAR</div>
</a></td>
</tr>
<tr>
<td id=”a7″> <img src=”pixel.gif” width=”5″ height=”5″></td>
<td id=”b7″><a href=”articles.html?codi=7″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘7’)” onMouseOut=”categoriesMouseOut(‘7’)”>JARDIN</div>
</a></td>
</tr>
<tr>
<td id=”a8″><img src=”pixel.gif” width=”5″ height=”5″></td>
<td id=”b8″><a href=”articles.html?codi=8″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘8’)” onMouseOut=”categoriesMouseOut(‘8’)”>LIBROS</div>
</a></td>
</tr>
<tr>
<td id=”a9″><img src=”pixel.gif” width=”5″ height=”5″></td>
<td id=”b9″><a href=”articles.html?codi=9″ class=”categories”>
<div style=”width:100%” onMouseMove=”categoriaMouseMove(‘9’)” onMouseOut=”categoriesMouseOut(‘9’)”>OTROS</div>
</a></td>
</tr>
</table></td>
<td width=”552″ valign=”top”>
<object name=”flash” width=”100″ height=”22″>
<embed src=”button1.swf” quality=”high” pluginspage=”http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash” type=”application/x-shockwave-flash” width=”100″ height=”22″ ></embed>
</object>
</td>
</tr>
</table>
<table width=”730″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td colspan=”3″ align=”center” class=”explicacio”><img id=”ajustador2″ src=”pixel.gif” width=”20″ height=”40″></td>
</tr>
<tr>
<td colspan=”3″ align=”center” class=”explicacio”><div id=”e”>&nbsp;</div></td>
</tr>
<tr>
<td colspan=”3″ class=”links”><div align=”center”><img id=”ajustador1″ src=”pixel.gif” width=”15″ height=”15″></div></td>
</tr>
<tr>
<td colspan=”3″ class=”links”><div align=”center” class=”condiciones”><font color=”#FF0000″><a href=”condiciones.html” class=”condiciones”>CONDICIONES
GENERALES DE LA VENTA</a></font></div></td>
</tr>
<tr>
<td colspan=”3″><div align=”center”><img src=”pixel.gif” width=”15″ height=”15″></div></td>
</tr>
<tr>
<td width=”17%”><div align=”center”><a href=”mailto:[email protected]” class=”links”>CONTACTAR</a></div></td>
<td width=”43%”><div align=”center”><a href=”subscripcion.html” class=”links”>SUSCRIBIRSE
A INFORMACION DE OFERTAS</a></div></td>
<td width=”40%”><div align=”center”><a href=”solicitud_informacion.html” class=”links”>SOLICITUD
DE INFORMACION DE ARTICULOS</a></div></td>
</tr>
<tr>
<td colspan=”3″><img src=”pixel.gif” width=”10″ height=”10″></td>
</tr>
</table>
<p>&nbsp;</p>
<td bgcolor=”#CCCC99″><img src=”pixel.gif” width=”5″ height=”15″></td></td></tr>
</table>

</body>
</html>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@rbruchauthorJun 20.2005 — I answer myself, jejej,

Just changed onMouseMove ever for onMouseOver ans it worked fine.
×

Success!

Help @rbruch spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...