With this code
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>Beräkna vv-points</title>
<script language="javascript">
<!--
function iPoints(){
var f = document.vvp;
f.points.value = Math.round((f.volym.value/100)*(f.kcal.value/60 + f.fett.value/9)*10)/10;
}
//->
</script>
</head>
<body>
<h2><strong>Omvandla till points</strong></h2>
<form id="form1" name="vvp" method="post" action="">
<table width="394" border="0">
<tr>
<td width="145">Konsumerad Mängd</td>
<td width="239"><input name="volym" type="text" id="volym" value="100" size="6" maxlength="3" />
gram</td>
</tr>
<tr>
<td>Energi</td>
<td><input name="kcal" type="text" id="kcal" size="6" maxlength="4" />
kcal/100g</td>
</tr>
<tr>
<td>Fett</td>
<td><input name="fett" type="text" id="fett" size="6" maxlength="3" />
gram/100g</td>
</tr>
<tr>
<td> </td>
<td><input name="knp" type="button" id="knp" onClick="iPoints( );" value="ge points" /></td>
</tr>
<tr>
<td>Summa points </td>
<td><input name="points" type="text" id="points" size="6" maxlength="5" /></td>
</tr>
</table>
</form>
</body>
</html>
after convertin with mobipocket creator 4 I´m geting
Quote:
Some error happened while executing a script.
Error: Invalid type for requested action In:_widget_event At line:0
|