Onclick works on IE Safari Chrome BUT NOT on Firefox!

hi all, i am getting crazy here because this code bellow works fine in every major browser but not on Firefox.

What I am trying to do is really simple, when I click on a link I want to call a javascript function and pass the value of a field to that function. I tried several combinations and nothing. Here’s the test 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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Click Here</title>

<script type="text/javascript">

function ftest(vars){
alert(vars);
}

</script>
</head>
<body>
<a href="javascript: ftest('field2.value')">Click Here</a> <br />
<br />
<input name="field1" id="field2" type="text" />
</body>
</html>