Jump to content

Xiang

Caspio Guru
  • Content Count

    75
  • Joined

  • Last visited

  • Days Won

    9

Xiang last won the day on May 28 2016

Xiang had the most liked content!

About Xiang

  • Rank
    Advanced Member

Recent Profile Visitors

1,008 profile views
  1. Hi Cameron, How are you? I think, you can use the following script: <SCRIPT LANGUAGE="JavaScript"> function setDate() { var firstDateFieldName = "first"; var secondDateFieldName = "second"; firstDateFieldName = "InsertRecord" + firstDateFieldName; secondDateFieldName = "InsertRecord" + secondDateFieldName; var f_Date = document.getElementById(firstDateFieldName ).value; var first_Date = new Date(Date.parse(f_Date)); var result_Date = new Date (first_Date.setMonth(first_Date.getMonth()+1)); var d_month = result_Date.getMonth() + 1;
  2. Hello Logan, I checked with numbers also. Please note, that you should add a Header&Footer element, select the Footer element, click the Source button (or disable HTML Editor) and enter the code. If you enter the code before the field, script cannot work. Please also note, that the name of the field must be the exact same as in Table design. Please verify, that it's a Submission form. If it's a Details or Single/Update form, you can use the following code: <script type="text/javascript"> function capitalize() { var fieldname = "YOUR_FIELD_NAME"; fieldname = "EditRecord"+f
  3. Hello Logan, How are you doing? I think, you can use the following script (don't forget to change "YOUR_FIELD_NAME" to the name of your field) <script type="text/javascript"> function capitalize() { var fieldname = "YOUR_FIELD_NAME"; fieldname = "InsertRecord"+fieldname; confirmname = fieldname+"@Confirm"; document.getElementById(fieldname).value = document.getElementById(fieldname).value.toUpperCase(); document.getElementById(confirmname).value = document.getElementById(confirmname).value.toUpperCase(); } document.getElementById('caspioform').onsubmit=capitalize; </script&
  4. Hi mmorales, Thank you for sharing the solution! Does the query exclude only Sundays?
  5. Hello Sean, How are you? I think, you can use the following code: <script> function calculate(){ var selection = document.getElementsByName("InsertRecorddropdown")[0].value; var one = parseFloat(document.getElementById("InsertRecordone").value); var two = parseFloat(document.getElementById("InsertRecordtwo").value); var three = parseFloat(document.getElementById("InsertRecordthree").value); var four = parseFloat(document.getElementById("InsertRecordfour").value); var five = parseFloat(document.getElementById("InsertRecordfive").value); var six = parseFloat(document.getElementB
  6. Hi peterhanse, Welcome to the Forum! How are you? I think, you can use the following code: <script> var column_number = 1; var myTable = document.getElementsByName("cbTable")[0]; var myRows = myTable.getElementsByTagName("tr"); var lastRow = myRows.length - 1; var myCells = myRows[lastRow].getElementsByTagName("td"); var myTotal = parseFloat(myCells[column_number].innerHTML); var paard = "voeg uw paard toe!"; var voegtoe = "upgrade uw acount!"; if(myTotal>0) { document.write("<p>Link: " + paard.link("http://google.nl") + "</p>") } else { document.write("<p&
  7. Hi Jan, I think, you can add this code to the Footer (do not forget clicking the Source button and changing FIELDNAME to the name of your field): <SCRIPT LANGUAGE="JavaScript"> var myDate = new Date(); myDate.setFullYear(myDate.getFullYear()+1); var myMonth = myDate.getMonth() + 1; if (myMonth<10) {myMonth = "0" + myMonth;} var myDay = myDate.getDate(); if (myDay<10) {myDay = "0" + myDay;} var myYear = myDate.getFullYear(); var result = myDay + "." + myMonth + "." + myYear; document.getElementById("InsertRecordFIELDNAME").value=re
  8. Hi hsilvermanmdjd, How are you? How's the weather in your city? I'm sorry that I answer instead of MayMusic, but - you can change the "InsertRecordFIELDNAME" to "EditRecordFIELDNAME", then the script will work on the Details page too.
  9. Hi Cameron, How are you? I think, you can add a Header and Footer element, select the Footer element, click the Source button or disable the HTML Editor, and enter the following code: <script> document.getElementById("InsertRecordFIELDNAME").setAttribute("onchange","loadFile(event)"); var loadFile = function(event) { var output = document.getElementById('output'); output.src = URL.createObjectURL(event.target.files[0]); }; </script> Enter the name of your field instead of "FIELDNAME". And add an HTML Block, click the Source button or disable the HTML Edi
  10. Wow! Thank you for the solution! It's amazing! And you can add any comparison, if you want to calculate records by any condition. So simple, so cool! I can only add, that I hide all data with the following code in the Header: <style> .cbResultSetData { display:none; } </style>
  11. Good morning menathansmith, I think, it's better to add a Header and Footer element, select the Footer element, click the Source button and enter the code. Does it work?
  12. Good morning Sidhartha, How are you? I think, you can use the following code to change the text of a label on a Submission Form: document.getElementById("InsertRecordFEILDNAME").parentNode.previousSibling.firstChild.innerHTML="NEW LABEL"; Please, enter the name of your field instead of FIELDNAME and your text instead of "new label". I'll be grateful, if you tell me if the code works. Have a nice day!
  13. Good morning, Desi! How are you doing? I think, you can use a JavaScript code. This code should work: <SCRIPT LANGUAGE="JavaScript"> function costcalculate() { var cost = parseFloat(document.getElementById("InsertRecordCost").value); var markup = parseFloat(document.getElementById("InsertRecordMarkup").value); document.getElementById("InsertRecordPrice").value = cost*markup+cost; } function markupcalculate() { var cost = parseFloat(document.getElementById("InsertRecordCost").value); var markup = parseFloat(document.getElementById("InsertRecordMarkup").value); if (cost==0) { d
  14. Good evening, Michael! How are you doing? I'm learning the JavaScript now, so, I think, capital letters are a problem. Names of your fields don't contain them, but the code does. This code should work: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var position1 = document.getElementById("InsertRecordPosition1").value; var position2 = document.getElementById("InsertRecordPosition2").value; var allpositions = position1 + position2; document.getElementById("InsertRecordAllPositions").value = allpositions; } document.getElementById("caspioform").onsubmit=concatenate
×
×
  • Create New...