Script won't work on chrome?
Hello!
I would be grateful if you guys could enlighten me why this script works in other browsers, but fails in chrome.
It's just supposed to alert a name depending on the fruits you've chosen.
Code:
<html>
<head>
<title></title>
<script type="text/javascript">
function FruitBox()
{
alert(window.document.myform.fruit.value);
}
</script>
</head>
<body>
<form name="myform">
<input type="radio" name="fruit" onClick="window.document.myform.fruit.value = 'oranges'">Oranges & Tangerines<br>
<input type="radio" name="fruit" onClick="window.document.myform.fruit.value = 'bananas'">Bananas<br>
<input type="radio" name="fruit" onClick="window.document.myform.fruit.value = 'peaches'">Peaches, Nectarines & Plums<br>
Choose your favorite and <a href="javascript:FruitBox()">click here</a>.
</form>
</body>
</html>