Jump to content


Caspio Ninja
  • Content Count

  • Joined

  • Last visited

  • Days Won


wgalliance last won the day on January 13 2017

wgalliance had the most liked content!

About wgalliance

  • Rank
    Advanced Member

Recent Profile Visitors

657 profile views
  1. I have a script that formats the phone number input to a particular mask, which works great. There are three fields in this Datapage that need the same masking script and currently I have copied the code three times and simply changed the field that it refers to (code below). I am wondering if there is a way to add an array to this so that if you update either the Finance_Phone, Primary_Phone or Additional_phone the script will run. That way the full script is on the page only once and not copied three times. function f_a(v_id) { return document.getElementById(v_id); } f_
  2. I tried again and it is still not working. Here is my final code with your edit: <script> var o_els = new Array("EditRecordPublicPhone","EditRecordFaxNumber") ; function tel() { // Read the content of the textbox // var message = document.getElementById("o_els").value; //Skip function if textbox is empty, else you will see () - for (var i = 0; i < o_els.length; i++) { if (o_els != "") { var message=document.getElementById(o_els).value; // Strip off all the spaces document.getElementById(o_els).value = (message.replace(/[^\d]/g, '')); var message1 = doc
  3. I am currently using the above code on an update form to edit three phone fields and it is working well with one exception: I occasionally will have a customer that will remove a phone number and want to leave that field blank. Currently if this is done the field reverts to showing "( ) -". Is there code that I can add to make this field completely blank if the user decides to delete a phone number previously stored? Thank you.
  • Create New...