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
- #SharePoint Product Configuration Wizard Error: Unable to create a Service Connection Point in AD #SP2010 #PS2010
- My slides at SharePoint Saturday Paris
- #ProjectOnline / #ProjectServer 2013 update #Project Name description on PDP #JavaScript #jQuery
- #ProjectOnline PWA Project Details Page integration with Project Roadmap #Office365 #PPM #PowerPlatform #MSFlow
- Updating User Profile Properties via PowerShell (PictureURL)–SharePoint 2010 #in #SP2010
- #ProjectOnline and adaptive cards in #MicrosoftTeams using #MicrosoftFlow for Project Owner actions #PPM #ProjectManagement #MSProject #Office365 #PowerPlatform
- SharePoint and PDFs
- Where is the Project Fields web part in #ProjectServer 2013? #PS2013 #SP2013
- Using Custom list entries to create Enterprise Projects
- Project Server 2013 More Symptoms to Lost Resource Issue #PS2013 #LostResources #ProjectServer
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,716 hits





