View Single Post
Old 10-16-2005, 01:10 PM   #19
Junior Member
ptr_lks began at the beginning.
Posts: 3
Karma: 10
Join Date: Aug 2005
Device: qtek s100
With this code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<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;

<h2><strong>Omvandla till points</strong></h2>
<form id="form1" name="vvp" method="post" action="">
  <table width="394" border="0">
      <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" />        
      <td><input name="kcal" type="text" id="kcal" size="6" maxlength="4" />      
      <td><input name="fett" type="text" id="fett" size="6" maxlength="3" />      
      <td><input name="knp" type="button" id="knp" onClick="iPoints( );" value="ge points" /></td>
      <td>Summa points </td>
      <td><input name="points" type="text" id="points" size="6" maxlength="5" /></td>
after convertin with mobipocket creator 4 Im geting
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