Re: Real-time form-field updating



This is code from "http://www.mcfedries.com/JavaScript/AddItUp.asp";
that looks like it does what I am looking for, but it is based off of
drop down menus and I am using text boxes for my entry source. Can
anyone tell me how I need to edit this so that it will work for text
boxes?


<SCRIPT LANGUAGE="JavaScript">
<!--
function AddItUp(form) {
var item, firstValue, secondValue, thirdValue;

// Get the value of the item that's selected in the first list
item = form.first.selectedIndex;
firstValue = eval(form.first.options[item].value)

// Get the value of the item that's selected in the second list
item = form.second.selectedIndex;
secondValue = eval(form.second.options[item].value)

// Get the value of the item that's selected in the third list
item = form.third.selectedIndex;
thirdValue = eval(form.third.options[item].value)

// Add up the value and display the total
form.total.value = firstValue + secondValue + thirdValue
}
//-->
</SCRIPT>

.



Relevant Pages

  • Re: CD ver8 export to TIFF Problem
    ... My apologies, somewhat new to groups ... Not much I know of to relate; I am following the menus and dialog boxes ... Prev by Date: ...
    (comp.graphics.apps.corel)
  • Menu Bar
    ... How can I have the full menus on the bar of "file, edit view etc. be fully ... Prev by Date: ...
    (microsoft.public.windowsxp.general)
  • how to edit a word file which has been archived
    ... It will allow you to select pre-defined yes/no boxes but it will not allow ... The file properties show the attributes to be greyed out and the only box ... Is there anyway to edit this form? ... Prev by Date: ...
    (microsoft.public.word.docmanagement)
  • Re: Drop down toolbar settings
    ... > Can anyone tell me how to get drop down boxes to show the full option ... > contents, first time? ... the "always show full menus" box ... Prev by Date: ...
    (microsoft.public.windowsxp.accessibility)
  • Re: How can I remove hidden empty text cells from Excel?
    ... Or, if you actually do mean Text Boxes, do this: ... Click on Edit> Go to> Special ... them use the Tab key. ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)