Jump to content


  • Posts

  • Joined

  • Last visited

UltraSrc's Achievements


Newbie (1/14)



  1. Thank you - changing the last line of the code has worked out. Much appreciated it.
  2. When one of my end users fills out a form then need to use the barcode scanner. An example of the text would be "%247463$1$0$4$20%". My script below is suppose to extract everything after the first two characters up to the last character. It works but it is also showing the original along with it. <script> function modify() { //Store the value in the field to trim. var trim = document.getElementsByName("InsertRecordBarcode")[0].value; //Take a substring of trim and store it back into new trim value. trim = trim.match("%2(.*)%"); //Set the value of the weight field in the form to the new substring document.getElementsByName("InsertRecordBarcode")[0].value = trim; //the new value in the field is what is submitted. } //When the form is submitted called method modify. document.getElementById("caspioform").onsubmit=modify; </script> My result showing is "%247463$1$0$4$20%,47463$1$0$4$20". What am I doing wrong as I want it to only show the 47463$1$0$4$20. thank you.
  3. The code below works fine when someone changes the default value from No to Yes in my 'DispoToday' field. My challenge is when the record already has a value of Yes and someone updates another field then the script will update the date again. I only want the date to write out the first time someone changes the 'DispoToday' from No to Yes. <script type= "text/javascript"> function getT() { if(document.getElementById("EditRecordDispoToday").value == 'Yes') { document.getElementById("EditRecordTimeofView").value = '[@cb:Timestamp]'; } } document.getElementById("caspioform").onsubmit = getT; </script>
  • Create New...