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
- Contact
- How do I: Setup Visual Studio 2010 Console application to work with SharePoint 2010
- #ProjectServer #PS2013 / #PS2010 Last Modified and Last Published fields in PWA #SP2013 #PPM #ProjectOnline
- Supporting post for #ProjectServer 2013/ #ProjectOnline project fields displayed on project site #JavaScript #jQuery
- #SP2013 App Model–Tenant Administrator permissions required to install app On-Premise
- #ProjectOnline & #ProjectServer #PS2013 / #PS2016 Global Permissions access to PWA Settings Cog #SharePoint menu items
- I’ll be speaking at the Cambridge #SharePoint User Group 20th September 2011 #SP2010 #PS2010 #ProjectServer #MSProject
- Reporting on #ProjectOnline Resource Cost Rate Tables #Office365 #PPM #PowerBI #Excel #PowerQuery #MSProject
- #SharePoint Slide Libraries #SP2010
- Generate unique X and Y coordinates or grid references from a row number
Archives
Join 668 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
- 637,636 hits





