Jump to content

Search the Community

Showing results for tags 'masking'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 2 results

  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_a('EditRecordFinance_Phone').maxLength = 14; f_a('EditRecordFinance_Phone').onkeyup = function(v_e) { v_e = v_e || window.event; if (v_e.keyCode >= 65 && v_e.keyCode <= 90){ this.value = this.value.substr(0, this.value.length - 1); return false; }else if (v_e.keyCode >= 37 && v_e.keyCode <= 40){ return true; } var v_value =(this.value.replace(/[^\d]/g, '')); if (v_value.length==7) { this.value = (v_value.substring(0,3) + "-" + v_value.substring(3,7));} else if(v_value.length==10){ this.value = ("(" + v_value.substring(0,3) + ")" + v_value.substring(3,6) + "-" + v_value.substring(6,10)); }; }
  2. I have three fields in an Update Datapage (ManagementExpenses, FundraisingExpenses, and TotalRevenue) that I need to format as only numbers (no currency symbols), if someone enters $11,500.51 it would render 11500.51 or $1,500,000 would render as 1500000. I then use the numbers on a separate onchange function that calculates a % based on the three numbers in that same page. Could anyone help me with a script to remove any currency symbols if the user inputs them? I appreciate the help!
×
×
  • Create New...