Please help with very simple JavaScript logic. I want a my xml button to call a javascript function passing parameters then calculate and return an answer for display. Below is the relavant part of my XML file
<field name="x" />
<field name="y" />
<field name="z" />
<script language="JavaScript">
function findWriter() {
//user to enter numeric values x and y
//this script to calculate z = x + y and update <field name="z" />
}
</script>
<input type="button" value="Display Writer" onClick="findWriter()"/>