Jump to content

DCT247

Members
  • Posts

    2
  • Joined

  • Last visited

  • Days Won

    1

DCT247 last won the day on April 24 2015

DCT247 had the most liked content!

DCT247's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. I have the following JS code in my single record update datapage. I want to update only certain blocks of data if the correct course code is chosen. It appears that ALL of the fields are updated everytime I run this datapage. All values are coming from external parameters. The good news is that the parameters are being read and written to the table..... bad news is that I only want the subset of fields to be written to the table... please help. All fields are "HIDDEN" and external parameters are checked to receive on load (not pass on exit)... My Code: <script language="JavaScript"> function myFunctionV1() var coursecheck = document.getElementById("EditRecordcoursecode").value; if (coursecheck = 'CTvi') { document.getElementById("EditRecordCVHAR").value = CVHAR; document.getElementById("EditRecordbox1i").value = box1i; document.getElementById("EditRecordbox2i").value = box2i; document.getElementById("EditRecordbox3i").value = box3i; document.getElementById("EditRecordbox4i").value = box4i; document.getElementById("EditRecordbox5i").value = box5i; document.getElementById("EditRecordbox6i").value = box6i; document.getElementById("EditRecordbox7i").value = box7i; document.getElementById("EditRecordbox8i").value = box8i; document.getElementById("EditRecordbox9i").value = box9i; document.getElementById("EditRecordbox10i").value = box10i; document.getElementById("EditRecordbox1a").value = box1a; document.getElementById("EditRecordbox2a").value = box2a; document.getElementById("EditRecordbox3a").value = box3a; document.getElementById("EditRecordbox4a").value = box4a; document.getElementById("EditRecordbox5a").value = box5a; document.getElementById("EditRecordbox6a").value = box6a; document.getElementById("EditRecordbox7a").value = box7a; document.getElementById("EditRecordbox8a").value = box8a; document.getElementById("EditRecordbox9a").value = box9a; document.getElementById("EditRecordbox10a").value = box10a; } else if (coursecheck = 'CTpp') { document.getElementById("EditRecordCPACH").value = CPACH; document.getElementById("EditRecordCPSOC").value = CPSOC; document.getElementById("EditRecordCPOBS").value = CPOBS; document.getElementById("EditRecordCPTHI").value = CPTHI; } else { } document.getElementById("caspioform").onsubmit=myFunctionV1; </SCRIPT>
  2. I have 2 tables: transaction table and profile table. The transaction table records user name info, test scores, and specific user choices from a lesson. I send the data to Caspio using URL parameters and it works flawlessly. My transaction table has 50 fields (not all fields contain new data with each update). My profile table has 20 fields that are a subset of the transaction table fields. If I update my transaction table via a form and then load a second form and pass the parameters from the first.... the target fields are ALL overwritten (even when the source field is blank)... Target form is a single record update form, looks for unique id and receives all external parameters... How would this be avoided? Thank you...
×
×
  • Create New...