Jump to content

mikeg

Members
  • Content Count

    9
  • Joined

  • Last visited

About mikeg

  • Rank
    Newbie

Recent Profile Visitors

576 profile views
  1. mikeg

    Collecting 2 signatures

    That works! Thank you for your help.
  2. Hello, I have a signature pad working and writing to the table but I need to add a 2nd signature to complete a contract on the data page. When I try to draw in the 2nd signature pad it draws in the 1st one instead. Nothing can be drawn in the 2nd signature pad and it loads blue in color. The same code is in HTML Blocks for both signature pads, I simply changed the EditRecordSignature to EditRecordSalesSignature. Is there something else that needs to be edited for this to work?
  3. Never mind I just figured out this solution.... document.getElementById("EditRecordArea1_Subtotal_Cost").value = (a*7) + (b*7) + (c*7) + (d*7) + (e*7) + (f*40); document.getElementById("EditRecordArea2_Subtotal_Cost").value = (g*7) + (h*7) + (i*7) + (j*7) + (k*7) + (l*40); document.getElementById("EditRecordJob_Subtotal").value = (a*7) + (b*7) + (c*7) + (d*7) + (e*7) + (f*40) + (g*7) + (h*7) + (i*7) + (j*7) + (k*7) + (l*40); Thank You!
  4. Hi Vitalikssssss Thank you that corrected the calculations. Next would you please tell me the correct syntax to get the subtotals for the areas based on the last 3 lines in the following?.... <SCRIPT LANGUAGE="JavaScript"> function calculate() { var a = parseFloat(document.getElementById("EditRecordArea1_Sq_Ft").value); document.getElementById("EditRecordArea1_Sq_Ft_Cost").value = a*7; var b = parseFloat(document.getElementById("EditRecordArea1_Vertical").value); document.getElementById("EditRecordArea1_Vertical_Cost").value = b*7; var c = parseFloat(document.getElementById("EditRecordArea1_Steps").value); document.getElementById("EditRecordArea1_Steps_Cost").value = c*7; var d = parseFloat(document.getElementById("EditRecordArea1_Cracks").value); document.getElementById("EditRecordArea1_Cracks_Cost").value = d*7; var e = parseFloat(document.getElementById("EditRecordArea1_Pitting").value); document.getElementById("EditRecordArea1_Pitting_Cost").value = e*7; var f = parseFloat(document.getElementById("EditRecordArea1_Removal").value); document.getElementById("EditRecordArea1_Removal_Cost").value = f*40; var g = parseFloat(document.getElementById("EditRecordArea2_Sq_Ft").value); document.getElementById("EditRecordArea2_Sq_Ft_Cost").value = g*7; var h = parseFloat(document.getElementById("EditRecordArea2_Vertical").value); document.getElementById("EditRecordArea2_Vertical_Cost").value = h*7; var i = parseFloat(document.getElementById("EditRecordArea2_Steps").value); document.getElementById("EditRecordArea2_Steps_Cost").value = i*7; var j = parseFloat(document.getElementById("EditRecordArea2_Cracks").value); document.getElementById("EditRecordArea2_Cracks_Cost").value = j*7; var k = parseFloat(document.getElementById("EditRecordArea2_Pitting").value); document.getElementById("EditRecordArea2_Pitting_Cost").value = k*7; var l = parseFloat(document.getElementById("EditRecordArea2_Removal").value); document.getElementById("EditRecordArea2_Removal_Cost").value = l*40; document.getElementById("EditRecordArea1_Subtotal").value = Needs to be the sum of a*7 + b*7 + c*7 + d*7 + e*7 + f*40???; document.getElementById("EditRecordArea2_Subtotal").value = Needs to be the sum of g*7 + h*7 + i*7 + j*7 + h*7 + l*40 ???; document.getElementById("EditRecordJob_Subtotal").value = Needs to be the sum of a*7 + b*7 + c*7 + d*7 + e*7 + f*40 +g*7 + h*7 + i*7 + j*7 + h*7 + l*40???; } </SCRIPT>
  5. Hi Vitalikssssss Thanks for your reply. I realized the fields were set to text which is why I was getting NaN which I was able to resolve. The next issue is to create an estimate, I need to be able to enter the numbers on the field, then call the calculate function to give the values as they are not yet stored. Currently, I need to enter the values, submit the form, then reopen the form so the values load then the calculate function works.
  6. Also, I need to add these amounts to get a subtotal for each area example.... document.getElementById("EditRecordArea1_Subtotal_Cost").value = IsNull([@field:Area1_Sq_Ft_Cost],0)+ IsNull([@field:Area1_Vertical_Cost],0)+ IsNull([@field:Area1_Steps_Cost],0)+ IsNull([@field:Area1_Cracks_Cost],0)+ IsNull([@field:Area1_Pitting_Cost],0)+ IsNull([@field:Area1_Removal_Cost],0) This part does not work though. Any help would be appreciated.
  7. I realized the calculations do not work until the form has been submitted then opened again with values loaded. Is there a way to have the values calculate when fields were blank on load if you populate while page is open?
  8. I have a details page I need to make calculations for multiple fields to do estimating. I am entering values in fields and need to create a cost on the form. I was successful in creating some of the calculations but after the 4th calculation is made, the rest of the fields to be calculated display NaN. Here is the script and attached is a screen shot of the results.... <button style="background:red" onclick="calculate()">Calculate</button> <SCRIPT LANGUAGE="JavaScript"> function calculate() { var a = [@field:Area1_Sq_Ft] document.getElementById("EditRecordArea1_Sq_Ft_Cost").value = a*7; var b = [@field:Area1_Vertical] document.getElementById("EditRecordArea1_Vertical_Cost").value = b*7; var c = [@field:Area1_Steps] document.getElementById("EditRecordArea1_Steps_Cost").value = c*7; var d = [@field:Area1_Cracks] document.getElementById("EditRecordArea1_Cracks_Cost").value = d*7; var e = [@field:Area1_Pitting] document.getElementById("EditRecordArea1_Pitting_Cost").value = e*7; var f = [@field:Area1_Removal] document.getElementById("EditRecordArea1_Removal_Cost").value = f*40; var g = [@field:Area2_Sq_Ft] document.getElementById("EditRecordArea2_Sq_Ft_Cost").value = g*7; var h = [@field:Area2_Vertical] document.getElementById("EditRecordArea2_Vertical_Cost").value = h*7; var i = [@field:Area2_Steps] document.getElementById("EditRecordArea2_Steps_Cost").value = i*7; var j = [@field:Area2_Cracks] document.getElementById("EditRecordArea2_Cracks_Cost").value = j*7; var k = [@field:Area2_Pitting] document.getElementById("EditRecordArea2_Pitting_Cost").value = k*7; var l = [@field:Area2_Removal] document.getElementById("EditRecordArea2_Removal_Cost").value = l*40; } </SCRIPT>
  9. I have the signature working on my form and the data captured on the table. What can the data that was captured be viewed with for reference?
×
×
  • Create New...