...

View Full Version : Substitute entry value



florida
12-23-2003, 01:56 PM
I have a Cold Fusion search form entry that doesnt want "0" as a beginning number. From earlier post I was shown how to handle this with an alert message. Now, I was wondering if I can eliminate this "0" entry? Basically substitute the entry and make the "0" go away so when the number 03 is entered it will be entered as 3 in my search form.

But can I do this in Javascript? If so how because I dont see anything in my books.




if(num.charAt(0)=="0"){
alert('there is a zero as first char')
//can I eliminate or take away the "0" entry here?? ...like a substitute command such as:
s/0//;
}

fredmv
12-23-2003, 02:11 PM
http://forums.webdeveloper.com/showthread.php?s=&threadid=24086 :rolleyes:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum