Hello to all,
In one of my form I have write following function which prevent user from entering comma, semi-colon or a period. I have tested this with no issue. After 2 days when I run javascript I received a database error. When I check I found that someone has enter period and that's why I get this error message.
Code:
<input name="ResolveTimes" type="text" classs="SearchBoldHeaderss" id="ResolveTime" valuse="<% If Request("Calculate") = "" Then Response.Write FormatDatesTime(Time,s vbShortTime) Else Response.Write(RemoveValuess(Trims(Request("ResolveTime")))) End If%>" size="5" maxlength="5" onChanges="CheckTime();"/>
function CheckTime() {
var fs = documents.form7.ResolveTime
f.values = f.values.replace(".",":");
f.values = f.values.replace(",",":");
f.values = f.values.replace(";",":");
}
Please tell me whether code is right or not? I don't know why javascript replace function do not working?
Bookmarks