Jump to content

Accountability

Caspio Ninja
  • Posts

    78
  • Joined

  • Last visited

Everything posted by Accountability

  1. Hello MayMusic' First of all, I want to thank you for taking the time to help. This is not the first time you have helped me and I see you help a lot of other people. I hope you know how grateful and appreciative I am for you kindness. If I had your e-mail address, I could send you a link and log-in credentials to get to this form. I can't publish this publicly. I certainly do not want to intrude on your privacy so I understand if that is not possible. That said, I have included a screenshot with the fields involved as well as the form section . I tried the suggested JS but not functioning just yet. Once again thanks so much for you help.
  2. Tried another approach which also didn't work. <SCRIPT LANGUAGE="JavaScript"> function calculate() if ((document.getElementById("InsertRecordBuild_On_Site").value) == "Yes" && (document.getElementById("InsertRecordOn_Site_Upcharge_Percentage").value) >= "10" ) { var v_price = parseFloat(document.getElementById("InsertRecordBldg_Base_Price").value); var v_percent = parseFloat(document.getElementById("InsertRecordOn_Site_Upcharge_Percentage").value); var v_total = (v_price * (v_percent/100)); document.getElementById("InsertRecordBldg_Upcharge").value = Math.round(v_total); } /* On submitting the webform, the function calculate is executed */ document.getElementById("caspioform").onsubmit=calculate; else var v_total = 0; document.getElementById("InsertRecordBldg_Upcharge").value = Math.round(v_total); } /* On submitting the webform, the function calculate is executed */ document.getElementById("caspioform").onsubmit=calculate; </SCRIPT> Any ideas would sure be much appreciated ?
  3. Changed to: <script> if ((document.getElementById("InsertRecordBuild_On_Site").value) == "Yes" && (document.getElementById("InsertRecordOn_Site_Upcharge_Percentage").value) >= "10" ){ function concatenate() { var position1 = document.getElementById("InsertRecordOn_Site_Upcharge_Percentage").value; var position2 = document.getElementById("InsertRecordBldg_Base_Price").value; var allpositions = (position1/100) * position2; document.getElementById("InsertRecordBldg_Upcharge").value = allpositions; } document.getElementById("caspioform").onsubmit=concatenate; } else { var position1 = 0 var allpositions = position1; document.getElementById("InsertRecordBldg_Upcharge").value = allpositions; } { document.getElementById("caspioform").onsubmit="0"; } </script> Something still not quite right. Any suggestions ? Thanks again...
  4. Hello MayMusic, Thanks so much for helping ! I was putting this in a HTML footer. Do I still use the syntax you provided ? Just at a glance does the rest of the script look correct ? Thanks again.
  5. Please need help with this JS. If the field On_Site_Upcharge_Percentage is greater than or equal to "10" and field Build_On_Site equals "yes", Need to replace field Bldg_Upcharge with the value of ((On_Site_Upcharge_Percentage/100) * Bldg_Base_Price). If the conditions are not met, need to replace Bldg_Upcharge with 0. ************************************************************************************************************************************************************************ <script> if("[@field:Build_On_Site]" == "Yes" && "[@field:On_Site_Upcharge_Percentage]">="10" ){ function concatenate() { var position1 = document.getElementById("InsertRecordOn_Site_Upcharge_Percentage").value; var position2 = document.getElementById("InsertRecordBldg_Base_Price").value; var allpositions = (position1/100) * position2; document.getElementById("InsertRecordBldg_Upcharge").value = allpositions; } document.getElementById("caspioform").onsubmit=concatenate; } else { var position1 = 0 var allpositions = position1; document.getElementById("InsertRecordBldg_Upcharge").value = allpositions; } { document.getElementById("caspioform").onsubmit="0"; } </script> ************************************************************************************************************************************************************************ Very much appreciate anyone's help.
  6. First of all, thanks so much for taking the time to respond. It is very much appreciated. I have built the form but it is not in full use yet. I was hoping to get advise as to the best practice for tracking time . I need to be able to report the percentage of time the student was present based on a 6 hour day. The fields are text 255. I just read your last response, I will attempt to utilize your suggestions over the weekend. Once again, thanks so much for helping !
  7. I am trying to figure out the best way to calculate a students attendance time. I have created four fields: Time_In_Hour, Time_In_Minutes, Time_Out_Hour and Time_Out_Minutes I have the the default values of: Time_In_Hour = 8 Time_In_Minutes = 15 (This represents 8:15 AM) Time_Out_Hour = 2 Time_Out_Minutes = 15 (This represents 2:15 PM) I have these as the default values but the teacher can change both times if the student comes in late or leaves early. I want to be able to report for each student the number of minutes attended per day based on a 6 hour day. Would very much appreciate any help ! :?
  8. Use: School environment> need to print multiple full page grade cards, Lunch money reminders, Multiple full page class schedules, etc. I have been trying to figure out how to have structured print output within an HTML dataPage or block without having to go the complicated .PDF route. For example lets say I have a multi-page report with grouping which Caspio does a wonderful job on screen, but I want to be able to hit a print link and it prints a proper multi-page report with a header and footer on each page with the grouped data content in the middle of each page. Does anyone have any code samples that could head me in the right direction. (Another more complicated option, if someone knew a way to programatically extract the data from a results page (Within an html block) and send an .XML or .CSV file to a web server where an automated .XML to .XSLT to FO where .pdf rendering could take palce and automatically stream back to the user for printing). Sure would be very grateful for the ideas or help. :?
  9. Hello ShWolf, That worked brilliantly. THANK YOU THANK YOU THANK YOU !!! Please know how much you help is appreciated. With Kind Regards, Accountability
  10. I have two Java Scripts: ****************************************************************************************************************************************************** 1) function concatenate() { var position1 = document.getElementById("EditRecordLast_Name").value; var position2 = document.getElementById("EditRecordHOH_ID").value; var allpositions = position1 +" ID:" + position2; document.getElementById("EditRecordStudent_Last_Name_ID").value = allpositions; } document.getElementById("caspioform").onsubmit=concatenate; ****************************************************************************************************************************************************** 2) function f_submit() { document.getElementById("caspioform").submit(); } window.onload = f_submit; ****************************************************************************************************************************************************** I can put script (1) in an html block or footer and it works perfectly. But if I add the auto-submit sctipt (2) in the footer it makes script1 quit working. I need for script one to work with the auto-submit script. Is there a way to make them work together ? Thanks in advance for your assistance
  11. If I have another form with JS on the same HTML page, do I just change the id="cb_wrapper" to cd1_wrapper, cd2_wrapper, etc. ? (and also the corresponding document.getElementById('cb_wrapper') to document.getElementById('cb1_wrapper'), document.getElementById('cb2_wrapper') etc. Is this correct ? Thank again... ********************************************************************************************************************************************************* Add this to the header of the page: and to the footer before all JS codes: and then replace document.getElementById("caspioform").onsubmit=charge; with document.getElementById('cb_wrapper').getElementsByTagName('form')[0].onsubmit=charge; *********************************************************************************************************************************************************
  12. OOPS... I spoke too soon. The destination had to be changed. It Works GREAT !!!!! I can't THANK YOU ENOUGH !!!! You are fantastic !!!
  13. Thank for responding. I did exactly as instructed. It did insert as expected but when it refreshed and returned to the page the form with the JS was not there (Just a few letters) where the form was. Any thoughts ? Thank You !
  14. Can this extract a multipage Report DataPage Results Page with Grouping into an XML for FTP for further processes ? Thanks...
  15. I have since removed the other datapage and it works perfectly on the page. Is there any way for me to have more datapages on the same html page ? Is there a way to specify in the JS that specific form ? Also, just as a learning moment for me, if it is possible to isolate or properly reference specific forms, is it possible for the other datapages to contain JS within HTML blocks or will that cause problems for the JS currently in question. As always THANK YOU!!!
  16. Thank you for catching that. It works perfectly in Caspio but does not on the actual web page. I do have another datapage on the same page. And I will probably have two or three more datapages on this page. Do you think that is the issue ? If I had to, I could probably create a view and incorporate all in one datapage, if I have to. Thank you again for taking the time to help me. Please know that it is deeply appreciated.
  17. I checked and all field names appear to be correct. Also I did notice that When a "0" value (via the else) is expected it is properly inserted into the Lunch_Charge or Breakfast_Charge fields. If I select "Lunch" or "Breakfast" check boxes I get a blank Lunch_Charge or blank Breakfast_Charge. If I leave both check marks blank I get a "0" value in Lunch_Charge and Breakfast_Charge fields as expected. It appears to be partially working because both fields are populated with "0" when expected. This was tested in Caspio and not from the .html. Anything else I should consider ? Thanks Again !
  18. I did try from Caspio. It did not post the Lunch_Charge or the Breakfast_Charge ( as expected0 but it did post a 0 value when check make was not selected (as expected).
  19. It did insert the Attendance_Meal_Date properly but the Breakfast_Charge and Lunch_Charge were not inserted. Any ideas ? Once again I am very grateful for your help. THANK YOU !!!
  20. Please need help with the following: Psudo Code> If> Field: Breakfast (Check Box) = "Yes" And> Field: Present (Check Box) = "Yes" Replace> Field: Breakfast_Charge (Numeric) with the value of> Field: Breakfast_Amount (Numeric) If> Field: Lunch (Check Box) = "Yes" And> Field: Present (Check Box) = "Yes" Replace> Field: Lunch_Charge (Numeric) with the value of> Field: Lunch_Amount (Numeric) Else> Do Nothing ****************************************************************************************************************************************************** Here is the code I attempted but does not work: if("[@Lunch]" == "Yes") && if("[@Present] == "Yes"){ function Lunchcharge() { var LCharge= document.getElementById("InsertRecordLunch_Amount").value"; document.getElementById("InsertRecordLunch_Charge").value = LCharge; } document.getElementById("caspioform").onsubmit=Lunchcharge; } if("[@Breakfast]" == "Yes") && if("[@Present] == "Yes"){ function Breakfastcharge() { var LCharge= document.getElementById("InsertRecordBreakfast_Amount").value"; document.getElementById("InsertRecordBreakfast_Charge").value = LCharge; } document.getElementById("caspioform").onsubmit=Breakfastcharge; } ********************************************************************************************************************************************* Thanks You in Advance for Your Help !!!
  21. I have a field called bar_code. In both table 1 and tabe 2 it is a unique text 255 field. In datapage 1 I have it as a autovalue, hidden, random, unique, uppercase text, 8 characters field. I also have it passing this field parameter to the next page. In data page 2 I have this field display only. It does indeed display the field bar_code as expected but when I go to submit, I get a "this field should be a number" error on the displayed bar_code field. If anyone can help, I sure would appreciate it as I need to have this up and running by Monday A.M. if possible Thanks in advance !!! OOPS... Carelessness.. I selected a similar but incorrect table... Problem Solved.
  22. Is there a way to remove the top, bottom and right side red line on the fields of a datapage form ? Thanks
×
×
  • Create New...