Click here to Skip to main content
15,908,274 members
Home / Discussions / Web Development
   

Web Development

 
GeneralBlocking Recursive downloads (wget) Pin
keegan4-Dec-03 14:07
keegan4-Dec-03 14:07 
GeneralRe: Blocking Recursive downloads (wget) Pin
ZoogieZork4-Dec-03 18:27
ZoogieZork4-Dec-03 18:27 
GeneralRe: Blocking Recursive downloads (wget) Pin
keegan5-Dec-03 10:34
keegan5-Dec-03 10:34 
Generalie mac issues Pin
dknypinay4-Dec-03 13:41
dknypinay4-Dec-03 13:41 
GeneralRe: ie mac issues Pin
Not Active8-Dec-03 6:15
mentorNot Active8-Dec-03 6:15 
GeneralRe: ie mac issues Pin
dknypinay8-Dec-03 6:50
dknypinay8-Dec-03 6:50 
GeneralRe: ie mac issues Pin
Not Active8-Dec-03 10:31
mentorNot Active8-Dec-03 10:31 
GeneralTextbox validation Pin
si_693-Dec-03 4:16
si_693-Dec-03 4:16 
Hi all

i have the below functions which i use to validate a login, albeit not very well !
this is called when the user submits the form, all it does it checked they have entered something

what i need to do is to throw out an error when a user enters an alpha (a-Z) character as well
but im getting a bit stuck, can ne1 point me in the right direction here ???

thanks
si

function isblank(s)
{
for(var i=0; i < s.length; i++){
var c=s.charAt(i);
if((c!=' ') && (c!='\n') && (c!='\t')) return false;
}
return true;
}

function verify(f)
{
var msg;
var empty_fields="";
var errors="";
for (var i=0; i < f.length; i++) {
var e = f.elements[i];
if ((e.type == "text") || (e.type == "password")) {
if ((e.value=="") || isblank(e.value)){
empty_fields += "\n "+e.name;
continue;
}
}
}
if (!empty_fields && !errors) return true;

msg = "___________________________________________________________\n\n"
msg += "The login action could not been performed because of the following error(s).\n";
msg += "___________________________________________________________\n\n";

if(empty_fields){
msg +="The following required field(s) are empty:" + empty_fields + "\n";
if (errors) msg+="\n";
}
msg+=errors;

alert(msg);

return false;
}
GeneralRe: Textbox validation Pin
Geoff Kushnir3-Dec-03 18:46
Geoff Kushnir3-Dec-03 18:46 
GeneralRe: Textbox validation Pin
Populate1233-Dec-03 21:16
Populate1233-Dec-03 21:16 
GeneralRe: Textbox validation Pin
markkuk4-Dec-03 0:14
markkuk4-Dec-03 0:14 
GeneralUserConcurrency Pin
eolss3-Dec-03 3:31
eolss3-Dec-03 3:31 
GeneralRe: UserConcurrency Pin
Geoff Kushnir3-Dec-03 19:01
Geoff Kushnir3-Dec-03 19:01 
GeneralRe: UserConcurrency Pin
Populate1233-Dec-03 21:28
Populate1233-Dec-03 21:28 
GeneralConcurrency Metering Pin
eolss3-Dec-03 3:30
eolss3-Dec-03 3:30 
Generalsupplying &lt;frame&gt; content within same HTML file Pin
moredip2-Dec-03 14:48
moredip2-Dec-03 14:48 
Generalfile transfer!!!!! Pin
Mr. Cully2-Dec-03 6:39
Mr. Cully2-Dec-03 6:39 
GeneralRe: file transfer!!!!! Pin
moredip2-Dec-03 15:14
moredip2-Dec-03 15:14 
GeneralRe: file transfer!!!!! Pin
Populate1233-Dec-03 21:33
Populate1233-Dec-03 21:33 
GeneralSecure Cookies Pin
MatrixUndone2-Dec-03 6:05
sussMatrixUndone2-Dec-03 6:05 
GeneralRe: Secure Cookies Pin
Ian Darling2-Dec-03 6:28
Ian Darling2-Dec-03 6:28 
GeneralRe: Secure Cookies Pin
MatrixUndone2-Dec-03 7:14
sussMatrixUndone2-Dec-03 7:14 
GeneralRe: Secure Cookies Pin
Heath Stewart2-Dec-03 9:05
protectorHeath Stewart2-Dec-03 9:05 
GeneralRe: Secure Cookies Pin
MatrixUndone3-Dec-03 7:37
sussMatrixUndone3-Dec-03 7:37 
GeneralRe: Secure Cookies Pin
Heath Stewart3-Dec-03 8:19
protectorHeath Stewart3-Dec-03 8:19 

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.