Useful JavaScript Function: isInteger and isNumeric #SharePoint #SP2010 #in
Just a quick post as a reminder for myself in future projects.
1 function isNumeric(sText) 2 { 3 var ValidChars = "0123456789."; 4 var IsNumber=true; 5 var Char; 6 7 8 for (i = 0; i < sText.length && IsNumber == true; i++) 9 { 10 Char = sText.charAt(i); 11 if (ValidChars.indexOf(Char) == -1) 12 { 13 IsNumber = false; 14 } 15 } 16 return IsNumber; 17 18 } 19 20 function isInteger(sText) 21 { 22 var ValidChars = "0123456789"; 23 var IsNumber=true; 24 var Char; 25 26 27 for (i = 0; i < sText.length && IsNumber == true; i++) 28 { 29 Char = sText.charAt(i); 30 if (ValidChars.indexOf(Char) == -1) 31 { 32 IsNumber = false; 33 } 34 } 35 return IsNumber; 36 37 } 38
Categories: Work
Tags: JavaScript, MOSS 2007, SharePoint 2010, SPF 2010, WSS 3.0
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
Recommended Podcast
Top Posts
- Uploading an Existing Local Git Repository to BitBucket.
- Working with Enterprise Custom Fields via VBA Macros in MS Project 2010 #MSProject #ProjectServer #SharePoint #SP2010 #in
- TechNet Web Cast Slides: Deploying #ProjectServer on #VMWare with Shared Infrastructure #PS2010 #SharePoint #SP2010 #in
- Retrieving the Project GUID with JavaScript CSOM #PS2013 #PS2010 #MSProject #Office365 #in
- Practice makes Perfect Part 7 – Groups and Filters
- How do I: Setup Visual Studio 2010 Console application to work with SharePoint 2010
- Different approach to #Project team collaboration, what about #Office365 Groups? #ProjectOnline #PPM #PMO
- CodePlex Projects
- Reporting on #ProjectOnline Resource Cost Rate Tables #Office365 #PPM #PowerBI #Excel #PowerQuery #MSProject
- #ProjectServer and #SharePoint 2010 / 2013 April 2015 Cumulative Update #PS2010 #SP2010 #PS2013 #SP2013 #MSProject
Archives
Join 673 other subscribers
Tags
.NET Android Azure Business Intelligence C# Calculated Column Certification Chris Clements Client Object Model CodePlex conference CU Development EPM Excel Form Services 2010 François Souyri InfoPath 2010 Information Rights Management iOS iPad iPhone IRM ISCLondon JavaScript JQuery Microsoft Word Mobile Application MOSS 2007 Office 365 Office 2010 Other Performance PowerBI PowerShell Presentation Project Project 2010 Project 2013 Project Conference 2012 Project Management Project Managment Project Online Project Server Project Server 2007 Project Server 2010 Project Server 2013 PS2007 PS2010 Rights Management Server RMS Search SharePoint SharePoint 2010 SharePoint 2013 SharePoint 2016 SharePoint Designer 2010 SharePoint Online SharePoint Saturday UK SP.ClientContext.get_current() SP2010 SP2016 Speaking Engagements SPF 2010 sql server reporting services Supported File Types TechEd Europe 2012 Technical Preview visio Visual Studio 2010 Visual Web Part Web Part Windows 7 Workflow WSS 3.0Blog Stats
- 635,472 hits





