Cytat
<html>
<head>
<script type="text/javascript" src="mintAjax.js"></script>
<script type="text/javascript">
function ColorIn() {
mint.fx.Color("box", "backgroundColor", null, "B22222", 20, 500);
mint.fx.Color("box", "borderColor", null, "000000", 20, 500);
}
function ColorOut() {
mint.fx.Color("box", "backgroundColor", null, "B7C059", 20, 500);
mint.fx.Color("box", "borderColor", null, "8F9D11", 20, 500);
}
</script>
</head>
<body onload="ColorIn(); ColorOut();">
<script>
ColorIn();
ColorOut();
<div id="box" onmouseover="ColorIn()" onmouseout="ColorOut()"></div>
<div id="box" onmouseover="ColorIn()" onmouseout="ColorOut()"></div>
</script>
<?
echo ("ala ma kota");
?>
</body>
</html>
<head>
<script type="text/javascript" src="mintAjax.js"></script>
<script type="text/javascript">
function ColorIn() {
mint.fx.Color("box", "backgroundColor", null, "B22222", 20, 500);
mint.fx.Color("box", "borderColor", null, "000000", 20, 500);
}
function ColorOut() {
mint.fx.Color("box", "backgroundColor", null, "B7C059", 20, 500);
mint.fx.Color("box", "borderColor", null, "8F9D11", 20, 500);
}
</script>
</head>
<body onload="ColorIn(); ColorOut();">
<script>
ColorIn();
ColorOut();
<div id="box" onmouseover="ColorIn()" onmouseout="ColorOut()"></div>
<div id="box" onmouseover="ColorIn()" onmouseout="ColorOut()"></div>
</script>
<?
echo ("ala ma kota");
?>
</body>
</html>
Niestety nie chodzi. Możecie pomóc i powiedzieć gdzie robię błąd?
Podejrzewam że chodzi o wywołanie funkcji ze skryptów na stronie. Próbowałem na wiele sposobów:
<body onload="ColorIn(); ColorOut();">
a także bezpośrednio przed div i po nim, przewaliłem tematy na kilku forach, na stronie mintajax.pl, czytałem manuala ale tam jest tylko opis funkcji ale nigdzie nie znalazłem jak sie odwoływać do funkcji.
Przecież jak piszę stronę to mam kilka, kilkadziesiąt funkcji. Kilka moge mieć w pliku zewnętrznym ale i kilka w samym kodzie.
Funkcje umieszczam pomiędzy head a wywołuje w body.