View Single Post
Old 10-16-2005, 01:10 PM   #19
ptr_lks
Junior Member
ptr_lks began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2005
Device: qtek s100
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&auml;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&nbsp;M&auml;ngd</td>
      <td width="239"><input name="volym" type="text" id="volym" value="100" size="6" maxlength="3" />        
      &nbsp;&nbsp;&nbsp;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>&nbsp;</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 Im geting
Quote:
Some error happened while executing a script.
Error: Invalid type for requested action In:_widget_event At line:0

Last edited by ptr_lks; 10-16-2005 at 02:59 PM.
ptr_lks is offline