jester626 Posted May 26, 2007 Share Posted May 26, 2007 First off pleae don't flame me for my ignorance. I have downloaded a sample Ajax script and have managed to get it working (big feat on my part). However when using my own database I am having a problem when submitting an ID number. The script came thinking the ID number would be a numeric (i.e. 1001) value, in my database the ID number is alpha-numeric (i.e. A1001). The script has a line of code as such: var clientId = document.getElementById('clientID').value.replace(/[^0-9]/g,''); I know the problem is in te value.replace section because it is looking for strictly number where I have a letter and a number. How would I work around this? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
jester626 Posted May 26, 2007 Author Share Posted May 26, 2007 After scouring the web and a lot of trial and error, I have found the solution myself. Thought I'd post the change here in case some one else ever has this same problem var clientId = document.getElementById('clientID').value.replace(/[^a-z0-9]/g,''); Jester Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.