Click here to Skip to main content
16,012,153 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: javascripts help Pin
Rahul Walavalkar22-Jul-03 9:34
Rahul Walavalkar22-Jul-03 9:34 
GeneralRe: javascripts help Pin
henli22-Jul-03 22:18
henli22-Jul-03 22:18 
GeneralHTTP Compression and ASP Pin
User 1278219-Jul-03 11:15
User 1278219-Jul-03 11:15 
Generalhtml calendar Pin
Massy Sumlin18-Jul-03 6:08
Massy Sumlin18-Jul-03 6:08 
GeneralRe: html calendar Pin
Nino_118-Jul-03 15:50
Nino_118-Jul-03 15:50 
GeneralRe: html calendar Pin
Jon Hulatt21-Jul-03 0:20
Jon Hulatt21-Jul-03 0:20 
GeneralRe: html calendar Pin
Nino_121-Jul-03 5:13
Nino_121-Jul-03 5:13 
GeneralHelp with some JavaScript Pin
Paul Ingles18-Jul-03 5:06
Paul Ingles18-Jul-03 5:06 
I'm trying to modify a string so that any hyphens or spaces can be removed. At the moment, the code looks something like:

var strNum = document.all[document.all["MyValidator"].controltovalidate].value;
if(isNumberValid(strNum) && isCardTypeCorrect(strNum))
    return true;
else
    return false;


All I want to do is insert some code before the conditional so that any hyphens or spaces are removed from the strNum variable.

I've tried using the .replace method with a /-/gi regular expression but that doesn't seem to work -- I've not done any regex's in JavaScript before so I've probably missed something pretty obvious!

--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"

MS Messenger: paul@oobaloo.co.uk
Download my PGP public key

GeneralRe: Help with some JavaScript Pin
theJazzyBrain18-Jul-03 6:04
theJazzyBrain18-Jul-03 6:04 
GeneralRe: Help with some JavaScript Pin
Paul Ingles18-Jul-03 6:24
Paul Ingles18-Jul-03 6:24 
GeneralAh, a simple question.... Pin
Weiye Chen17-Jul-03 23:16
Weiye Chen17-Jul-03 23:16 
GeneralRe: Ah, a simple question.... Pin
Frank Olorin Rizzi18-Jul-03 1:53
Frank Olorin Rizzi18-Jul-03 1:53 
GeneralRe: Ah, a simple question.... Pin
Weiye Chen18-Jul-03 6:25
Weiye Chen18-Jul-03 6:25 
GeneralADSI w/C# Pin
Nino_117-Jul-03 17:51
Nino_117-Jul-03 17:51 
GeneralFound It!! Pin
Nino_117-Jul-03 18:38
Nino_117-Jul-03 18:38 
GeneralWeb Services with large response data sets... Pin
JasonSmith17-Jul-03 16:12
JasonSmith17-Jul-03 16:12 
GeneralIIS Mail server crash course Pin
eggie517-Jul-03 10:03
eggie517-Jul-03 10:03 
Generalabsolute page size using javascript Pin
Newborn Naughtysaint17-Jul-03 3:22
Newborn Naughtysaint17-Jul-03 3:22 
GeneralRe: absolute page size using javascript Pin
theJazzyBrain17-Jul-03 3:27
theJazzyBrain17-Jul-03 3:27 
GeneralRe: absolute page size using javascript Pin
Newborn Naughtysaint17-Jul-03 4:10
Newborn Naughtysaint17-Jul-03 4:10 
GeneralRe: absolute page size using javascript Pin
Rahul Walavalkar22-Jul-03 8:32
Rahul Walavalkar22-Jul-03 8:32 
QuestionUK Host - any advice? Pin
Debs16-Jul-03 12:53
Debs16-Jul-03 12:53 
GeneralLaunch IE from a link in Netscape Pin
Perlosaurus16-Jul-03 10:09
Perlosaurus16-Jul-03 10:09 
GeneralRe: Launch IE from a link in Netscape Pin
basementman17-Jul-03 5:16
basementman17-Jul-03 5:16 
Generalcalculation problem Pin
THEMYTH2216-Jul-03 4:17
THEMYTH2216-Jul-03 4:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.