Ik heb effe gefixed dat ie het in FF ook doet, :D
Hier het
voorbeeld again.
Enjoy
code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ;
<html xmlns="http://
www.w3.org/1999/xhtml"> ;
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style>
span {
font-size: 8pt;
font-family: verdana;
}
.credit {
font-style:italic;
color:#999999;
}
</style>
<script language="JavaScript">
g = function(x) { return document.getElementById(x); }
msg = new Array('', 'total crap dude', 'niet echt boeiend', 'wel ok', 'nice', 'supercoooooooool');
function rollOver(num) {
for(var i = 1; i <= num; i++) {
g(+i).src = 'star_over.gif';
}
g('status').innerHTML = '('+msg[num]+')';
g('rated').value = num;
}
function rollOut() {
for(var i = 1; i <= 5; i++) {
g(+i).src = 'star.gif';
}
g('status').innerHTML = '(click a star to vote)';
}
</script>
</head>
<body>
<span>Rate this article: </span>
<form action="rating_test.php" method="post" id="form" name="rate">
<input type="hidden" name="poll" id="rated" value="1" />
<?php
for($i = 1; $i <= 5; $i++) {
echo '<input type="image" src="star.gif" value="'.$i.'" id="'.$i.'" onclick="submit();" onmouseover="rollOver('.$i.')" onmouseout="rollOut()" style="cursor:pointer">';
}
?>
<span id="status">(click a star to vote)</span>
</form>
<br />
<?php
if(isset($_POST['poll']))
echo 'cliked rating is: <b>'.$_POST['poll'].'</b>';
?>
<br />
<br />
<span class="credit">by nano</span>
</body>
</html>
Link gekopieerd
Dankje, is net wat ik zocht, en het werkt nu in ieder geval perfect bij FF.
Link gekopieerd
Jelmer schreef op 02.11.2004 15:36
Jorik je ziet idd de sterren wel, maar je kunt niet clicken. Althans niet in mijn firefox versie (English 5,0).
Ow je moest ook nog kunne klikke :P?...
Link gekopieerd
Nu doet'ie het inderdaad... Toppie.
Elwin
Link gekopieerd