Home | Advertising Info117 USERS CURRENTLY ONLINE   
   Site Search Contact Us Wednesday, June 20, 2018  

User Management Application with web based screens that allow you to manage users.
Banner Rotation system. Advertisers can monitor online statistical reports via their web browsers.
ASP Photo Gallery
Upload an unlimited amount of albums. Set up categories.Image resizing thumbnail creation.
Classifieds system. Set up categories. Users can register themselves. Supports picture uploads.


We didn't realize
the site was so popular.

Other Stuff

Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds

(Advanced)  (Components)  (Database)  (General)  (Vbscript)


Subject: Re: client-side javascript code doesnt run
From: Harlan
Date: 3/8/1999 4:35:22 PM


I think I posted this in the vi6 form, but I doubt you would have found it even if you knew it was there. Here is the function I wrote for javascript validation..

'Name: CreateValidate()
'Purpose: Create Javascript Validate
' Takes: comma delimited string of form elements to validate.
' Returns: Nothing
Sub CreateValidate(strArrayValidationFields)
<Script language="JavaScript">
function Validate(objForm) {
Fields = Split(strArrayValidationFields,",")
For i = 0 to UBound(Fields)
response.write vbTab & "if (objForm." & fields(i) & ".value == " & chr(34) & chr(34) & ") {" & vbCrLf
response.write vbTab & "alert(" & chr(34) & "\n" & fields(i) & " is a requried field.\nPlease complete it and try again." & chr(34) & ")" & vbCrLf
response.write vbTab & "objForm." & fields(i) & ".focus()" & vbCrLf
response.write vbTab & "}" & vbCrLf
response.write vbTab & "else "
End Sub

here is how you use it..
<%call CreateValidate("txtName,txtAddy")%>
<form name='frmSomeForm' method='post'>
<input type='text' name='txtName'>
<input type='text' name='txtAddy'>
<input type='text' name='txtPhone'>
<input type='Button' name='Submit' Value='Submit' onClick="Validate(this.form)">

if you notice, I'm make sure they fill in
txtName and txtAddy, but they don't have to
fill in txtPhone. You can send it as many form
input names as you want to validate. Its a
good idea to add call the sub in the <head>
rather then the body (although it works in both).



Previous Message


   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2018 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com