Integrating captcha code

G

Guest

Hello,

As per several discussions below regarding spam, I have followed the advice
provided and I have downloaded a captcha program from one of the links
provided. However, now I don't know what do with it? When I downloaded the
program it opened upa new page on my frontpage. The "normal" view is blank,
but the html page has a very long code. What am I supposed to do with this?
Does the captcha go on the "disc_post" page or does it go on its own page?
Should I just cut and paste the html code right into the "disc_post" html
page? If so, does it go before or after the submit button? I am little
confused so please forgive the long post. Oh, and below is the html code as
it captcha appear in frontpage in case it helps. Thanks!
_______________________________________________________
<%@LANGUAGE="VBSCRIPT"%>
<%
'GNU General Public License (GPL)
'ASP Security Image Generator v2.0 - 09/April/2006
'Generate images with number to make a CAPTCHA test
'http://www.tipstricks.org
'Programmed By Emir Tüzül
'For correspondence or non support questions contact: (e-mail address removed)
'#Release History#
'2.0 - 31/10/2005
' *ABBYY FineReader 8.0 Professional could not recognized :)
' *Added image noise feature
' *Fixed and improved image distortion methods
' *Improved SendHex() function
'1.0 - 31/October/2005 First Release
' *ABBYY FineReader 8.0 Professional %99 recognized :(
' *Simple image distortion methods
%>
<%
Dim newBitmap(21,87)
Dim vDistort(8)
LDistortNum = 0
Const LeftMargin = 4
Const BottomMargin = 4
Const CharWidth = 10
Const CharHeight = 13
'Begin editable consts
Const CodeLength = 8 'Secure Code Length (Max:8)
Const Distort = True 'Vertical Image Distortion True/False
Const DistortEx = True 'Horizontal Image Distortion True/False
Const Noise = True 'Image Noise True/False
Const TClr = "0000CC" 'Text Color #CC0000
Const BClr = "FFFFFF" 'Background Color #FFFFFF
Const NClr = "0000CC" 'Noise Color #CC0000 (Recommend TClr=NClr)
'End editable consts
Const BmpHeader =
"424D8C1500000000000036000000280000005600000015000000010018000000000056150000120B0000120B00000000000000000000"
Const BmpEndLine = "0000"

Sub IHex(iRow,iColumn,strHex,iRepeat)
for x=0 to (iRepeat-1)
newBitmap(iRow,iColumn+x) = strHex
next
End Sub

Function Random(valMin,valMax)
Randomize(timer)
RangeSize = ((valMax - valMin) + 1)
Random = Int((RangeSize * Rnd()) + 1)
End Function

Sub AddNoise()
for x=0 to 28
ColX = (x*3) + Random(1,3)
for y=0 to 6
RowY = (y*3) + Random(1,3)
IHex RowY,ColX,NClr,1
next
next
End Sub

Sub WriteCanvas(valChar,iNumPart,iRow,iColumn)
select case iNumPart
case 1
select case valChar
case 0
IHex iRow,iColumn+2,TClr,4
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn+2,TClr,4
case 3
IHex iRow,iColumn+2,TClr,3
case 4
IHex iRow,iColumn+5,TClr,2
case 5
IHex iRow,iColumn+1,TClr,6
case 6
IHex iRow,iColumn+2,TClr,4
case 7
IHex iRow,iColumn,TClr,8
case 8
IHex iRow,iColumn+2,TClr,4
case 9
IHex iRow,iColumn+2,TClr,4
end select
case 2
select case valChar
case 0
IHex iRow,iColumn+1,TClr,6
case 1
IHex iRow,iColumn+2,TClr,3
case 2
IHex iRow,iColumn+1,TClr,6
case 3
IHex iRow,iColumn+1,TClr,6
case 4
IHex iRow,iColumn+4,TClr,3
case 5
IHex iRow,iColumn+1,TClr,6
case 6
IHex iRow,iColumn+1,TClr,6
case 7
IHex iRow,iColumn,TClr,8
case 8
IHex iRow,iColumn+1,TClr,6
case 9
IHex iRow,iColumn+1,TClr,6
end select
case 3
select case valChar
case 0
IHex iRow,iColumn,TClr,3
IHex iRow,iColumn+5,TClr,3
case 1
IHex iRow,iColumn+1,TClr,4
case 2
IHex iRow,iColumn,TClr,3
IHex iRow,iColumn+5,TClr,3
case 3
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+5,TClr,2
case 4
IHex iRow,iColumn+4,TClr,3
case 5
IHex iRow,iColumn+1,TClr,2
case 6
IHex iRow,iColumn+1,TClr,2
IHex iRow,iColumn+6,TClr,2
case 7
IHex iRow,iColumn+6,TClr,1
case 8
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 9
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
end select
case 4
select case valChar
case 0
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 1
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 3
IHex iRow,iColumn+5,TClr,2
case 4
IHex iRow,iColumn+3,TClr,4
case 5
IHex iRow,iColumn,TClr,2
case 6
IHex iRow,iColumn,TClr,2
case 7
IHex iRow,iColumn+5,TClr,2
case 8
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 9
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
end select
case 5
select case valChar
case 0
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 1
IHex iRow,iColumn,TClr,1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn+6,TClr,2
case 3
IHex iRow,iColumn+5,TClr,2
case 4
IHex iRow,iColumn+2,TClr,2
IHex iRow,iColumn+5,TClr,2
case 5
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+3,TClr,3
case 6
IHex iRow,iColumn,TClr,2
case 7
IHex iRow,iColumn+4,TClr,2
case 8
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 9
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
end select
case 6
select case valChar
case 0
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn+6,TClr,2
case 3
IHex iRow,iColumn+3,TClr,3
case 4
IHex iRow,iColumn+2,TClr,2
IHex iRow,iColumn+5,TClr,2
case 5
IHex iRow,iColumn,TClr,7
case 6
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+3,TClr,3
case 7
IHex iRow,iColumn+4,TClr,2
case 8
IHex iRow,iColumn+1,TClr,6
case 9
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+5,TClr,3
end select
case 7
select case valChar
case 0
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn+5,TClr,2
case 3
IHex iRow,iColumn+3,TClr,4
case 4
IHex iRow,iColumn+1,TClr,2
IHex iRow,iColumn+5,TClr,2
case 5
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 6
IHex iRow,iColumn,TClr,7
case 7
IHex iRow,iColumn+3,TClr,2
case 8
IHex iRow,iColumn+1,TClr,6
case 9
IHex iRow,iColumn+1,TClr,7
end select
case 8
select case valChar
case 0
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn+4,TClr,2
case 3
IHex iRow,iColumn+6,TClr,2
case 4
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+5,TClr,2
case 5
IHex iRow,iColumn+6,TClr,2
case 6
IHex iRow,iColumn,TClr,3
IHex iRow,iColumn+6,TClr,2
case 7
IHex iRow,iColumn+3,TClr,2
case 8
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 9
IHex iRow,iColumn+2,TClr,3
IHex iRow,iColumn+6,TClr,2
end select
case 9
select case valChar
case 0
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn+3,TClr,2
case 3
IHex iRow,iColumn+6,TClr,2
case 4
IHex iRow,iColumn,TClr,9
case 5
IHex iRow,iColumn+6,TClr,2
case 6
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 7
IHex iRow,iColumn+3,TClr,2
case 8
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 9
IHex iRow,iColumn+6,TClr,2
end select
case 10
select case valChar
case 0
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn+2,TClr,2
case 3
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 4
IHex iRow,iColumn,TClr,9
case 5
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 6
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 7
IHex iRow,iColumn+3,TClr,2
case 8
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 9
IHex iRow,iColumn+6,TClr,2
end select
case 11
select case valChar
case 0
IHex iRow,iColumn,TClr,3
IHex iRow,iColumn+5,TClr,3
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn+1,TClr,2
case 3
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 4
IHex iRow,iColumn+5,TClr,2
case 5
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 6
IHex iRow,iColumn+1,TClr,2
IHex iRow,iColumn+6,TClr,2
case 7
IHex iRow,iColumn+2,TClr,2
case 8
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+6,TClr,2
case 9
IHex iRow,iColumn,TClr,2
IHex iRow,iColumn+5,TClr,2
end select
case 12
select case valChar
case 0
IHex iRow,iColumn+1,TClr,6
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn,TClr,8
case 3
IHex iRow,iColumn+1,TClr,6
case 4
IHex iRow,iColumn+5,TClr,2
case 5
IHex iRow,iColumn+1,TClr,6
case 6
IHex iRow,iColumn+1,TClr,6
case 7
IHex iRow,iColumn+2,TClr,2
case 8
IHex iRow,iColumn+1,TClr,6
case 9
IHex iRow,iColumn+1,TClr,6
end select
case 13
select case valChar
case 0
IHex iRow,iColumn+2,TClr,4
case 1
IHex iRow,iColumn+3,TClr,2
case 2
IHex iRow,iColumn,TClr,8
case 3
IHex iRow,iColumn+2,TClr,4
case 4
IHex iRow,iColumn+5,TClr,2
case 5
IHex iRow,iColumn+2,TClr,4
case 6
IHex iRow,iColumn+2,TClr,4
case 7
IHex iRow,iColumn+2,TClr,2
case 8
IHex iRow,iColumn+2,TClr,4
case 9
IHex iRow,iColumn+2,TClr,4
end select
end select
End Sub

Function LeftTracking(iNumber)
select case iNumber
case 1
LeftTracking = 2
case 4
LeftTracking = 0
case else
LeftTracking = 1
end select
End Function

'http://support.microsoft.com/default.aspx?scid=kb;en-us;320375
Function CreateGUID(tmpLength)
Randomize Timer
Dim tmpCounter,tmpGUID
Const strValid = "01234567890"
For tmpCounter = 1 To tmpLength
tmpGUID = tmpGUID & Mid(strValid, Int(Rnd(1) * Len(strValid)) + 1, 1)
Next
CreateGUID = tmpGUID
End Function

Function GetStartColumn(iNumber,iLine)
if DistortEx = true then
DistortNum = (Random(1,3) - 1)
if DistortNum = 0 then
DistortNum = LDistortNum
end if
LDistortNum = DistortNum
else
DistortNum = 0
end if
GetStartColumn = LeftMargin + ((CharWidth * (iLine-1)) +
LeftTracking(iNumber)) + DistortNum
End Function

Sub SendHex(valHex)
for i=1 to Len(valHex)
strHex = "&H" & Mid(valHex,i,2)
Response.BinaryWrite ChrB(CInt(strHex))
i=i+1
next
End Sub

Sub SendClient()
Response.Buffer = True
Response.ContentType = "image/bmp"
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1

if Noise = true then
AddNoise()
end if

SendHex(BmpHeader)
for y=1 to 21
for x=1 to 86
tmpHex = newBitmap(y,x)
if tmpHex = vbNullString then
SendHex(BClr)
else
SendHex(tmpHex)
end if

if x=86 then
SendHex(BmpEndLine)
end if
next
next
SendHex(BmpEndLine)
Response.Flush
End Sub
%>

<%
secureCode = CreateGUID(CodeLength)
Session("CAPTCHA") = secureCode

for i=1 to CharHeight
rowNum = (21 - (BottomMargin + (i-1)))
for j=1 to Len(secureCode)
if (Distort = true) and (i=1) then
vDistort(j) = (Random(1,6) - 3)
elseif (i=1) then
vDistort(j) = 0
end if
tmpNum = CInt(Mid(secureCode,j,1))
clmNum = GetStartColumn(tmpNum,j)
WriteCanvas tmpNum,i,rowNum+vDistort(j),clmNum
next
next

SendClient()
%>
 
G

Guest

Hi Murray,

There were no specific instructions on the page. I saved the file on my pc
and when I unzipped it,
there were two "active server" files. One is an "eample" file , so I opened
the other one and nothing happens and there are
no instructions. file and a Here's the link to the page:

http://www.tipstricks.org/

Thanks for your help,
 
G

Guest

Hi Murray,

I was reading an answer you gave to a different post. You were suggesting
that the person use a "validation code" instead of captcha. Is this esaier?
If so, is there an easy way to get a validation code and to insert it into my
discussion group? Sorry for all these questions but I am not too versed in
html and I want something fairly "easy" to use.

Thanks,
 
S

SingaporeWebDesign

Hello,

That script requires programming knowledge of ASP.

Consider using the "Validation code" method if you do not have ASP skills.
Or using a third party e-mail service that provides captcha.
 
S

Stefan B Rusynko

The instructions are there at
http://www.tipstricks.org/howto_1.htm

Requires a host that supports ASP

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Hi Murray,
|
| There were no specific instructions on the page. I saved the file on my pc
| and when I unzipped it,
| there were two "active server" files. One is an "eample" file , so I opened
| the other one and nothing happens and there are
| no instructions. file and a Here's the link to the page:
|
| http://www.tipstricks.org/
|
| Thanks for your help,
|
| "Murray" wrote:
|
| > Did you read the directions on the page where you downloaded it?
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Hello,
| > >
| > > As per several discussions below regarding spam, I have followed the
| > > advice
| > > provided and I have downloaded a captcha program from one of the links
| > > provided. However, now I don't know what do with it? When I downloaded the
| > > program it opened upa new page on my frontpage. The "normal" view is
| > > blank,
| > > but the html page has a very long code. What am I supposed to do with
| > > this?
| > > Does the captcha go on the "disc_post" page or does it go on its own page?
| > > Should I just cut and paste the html code right into the "disc_post" html
| > > page? If so, does it go before or after the submit button? I am little
| > > confused so please forgive the long post. Oh, and below is the html code
| > > as
| > > it captcha appear in frontpage in case it helps. Thanks!
| > > _______________________________________________________
| > > <%@LANGUAGE="VBSCRIPT"%>
| > > <%
| > > 'GNU General Public License (GPL)
| > > 'ASP Security Image Generator v2.0 - 09/April/2006
| > > 'Generate images with number to make a CAPTCHA test
| > > 'http://www.tipstricks.org
| > > 'Programmed By Emir Tüzül
| > > 'For correspondence or non support questions contact: (e-mail address removed)
| > > '#Release History#
| > > '2.0 - 31/10/2005
| > > ' *ABBYY FineReader 8.0 Professional could not recognized :)
| > > ' *Added image noise feature
| > > ' *Fixed and improved image distortion methods
| > > ' *Improved SendHex() function
| > > '1.0 - 31/October/2005 First Release
| > > ' *ABBYY FineReader 8.0 Professional %99 recognized :(
| > > ' *Simple image distortion methods
| > > %>
| > > <%
| > > Dim newBitmap(21,87)
| > > Dim vDistort(8)
| > > LDistortNum = 0
| > > Const LeftMargin = 4
| > > Const BottomMargin = 4
| > > Const CharWidth = 10
| > > Const CharHeight = 13
| > > 'Begin editable consts
| > > Const CodeLength = 8 'Secure Code Length (Max:8)
| > > Const Distort = True 'Vertical Image Distortion True/False
| > > Const DistortEx = True 'Horizontal Image Distortion True/False
| > > Const Noise = True 'Image Noise True/False
| > > Const TClr = "0000CC" 'Text Color #CC0000
| > > Const BClr = "FFFFFF" 'Background Color #FFFFFF
| > > Const NClr = "0000CC" 'Noise Color #CC0000 (Recommend TClr=NClr)
| > > 'End editable consts
| > > Const BmpHeader =
| > > "424D8C1500000000000036000000280000005600000015000000010018000000000056150000120B0000120B00000000000000000000"
| > > Const BmpEndLine = "0000"
| > >
| > > Sub IHex(iRow,iColumn,strHex,iRepeat)
| > > for x=0 to (iRepeat-1)
| > > newBitmap(iRow,iColumn+x) = strHex
| > > next
| > > End Sub
| > >
| > > Function Random(valMin,valMax)
| > > Randomize(timer)
| > > RangeSize = ((valMax - valMin) + 1)
| > > Random = Int((RangeSize * Rnd()) + 1)
| > > End Function
| > >
| > > Sub AddNoise()
| > > for x=0 to 28
| > > ColX = (x*3) + Random(1,3)
| > > for y=0 to 6
| > > RowY = (y*3) + Random(1,3)
| > > IHex RowY,ColX,NClr,1
| > > next
| > > next
| > > End Sub
| > >
| > > Sub WriteCanvas(valChar,iNumPart,iRow,iColumn)
| > > select case iNumPart
| > > case 1
| > > select case valChar
| > > case 0
| > > IHex iRow,iColumn+2,TClr,4
| > > case 1
| > > IHex iRow,iColumn+3,TClr,2
| > > case 2
| > > IHex iRow,iColumn+2,TClr,4
| > > case 3
| > > IHex iRow,iColumn+2,TClr,3
| > > case 4
| > > IHex iRow,iColumn+5,TClr,2
| > > case 5
| > > IHex iRow,iColumn+1,TClr,6
| > > case 6
| > > IHex iRow,iColumn+2,TClr,4
| > > case 7
| > > IHex iRow,iColumn,TClr,8
| > > case 8
| > > IHex iRow,iColumn+2,TClr,4
| > > case 9
| > > IHex iRow,iColumn+2,TClr,4
| > > end select
| > > case 2
| > > select case valChar
| > > case 0
| > > IHex iRow,iColumn+1,TClr,6
| > > case 1
| > > IHex iRow,iColumn+2,TClr,3
| > > case 2
| > > IHex iRow,iColumn+1,TClr,6
| > > case 3
| > > IHex iRow,iColumn+1,TClr,6
| > > case 4
| > > IHex iRow,iColumn+4,TClr,3
| > > case 5
| > > IHex iRow,iColumn+1,TClr,6
| > > case 6
| > > IHex iRow,iColumn+1,TClr,6
| > > case 7
| > > IHex iRow,iColumn,TClr,8
| > > case 8
| > > IHex iRow,iColumn+1,TClr,6
| > > case 9
| > > IHex iRow,iColumn+1,TClr,6
| > > end select
| > > case 3
| > > select case valChar
| > > case 0
| > > IHex iRow,iColumn,TClr,3
| > > IHex iRow,iColumn+5,TClr,3
| > > case 1
| > > IHex iRow,iColumn+1,TClr,4
| > > case 2
| > > IHex iRow,iColumn,TClr,3
| > > IHex iRow,iColumn+5,TClr,3
| > > case 3
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+5,TClr,2
| > > case 4
| > > IHex iRow,iColumn+4,TClr,3
| > > case 5
| > > IHex iRow,iColumn+1,TClr,2
| > > case 6
| > > IHex iRow,iColumn+1,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 7
| > > IHex iRow,iColumn+6,TClr,1
| > > case 8
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 9
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > end select
| > > case 4
| > > select case valChar
| > > case 0
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 1
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+3,TClr,2
| > > case 2
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 3
| > > IHex iRow,iColumn+5,TClr,2
| > > case 4
| > > IHex iRow,iColumn+3,TClr,4
| > > case 5
| > > IHex iRow,iColumn,TClr,2
| > > case 6
| > > IHex iRow,iColumn,TClr,2
| > > case 7
| > > IHex iRow,iColumn+5,TClr,2
| > > case 8
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 9
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > end select
| > > case 5
| > > select case valChar
| > > case 0
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 1
| > > IHex iRow,iColumn,TClr,1
| > > IHex iRow,iColumn+3,TClr,2
| > > case 2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 3
| > > IHex iRow,iColumn+5,TClr,2
| > > case 4
| > > IHex iRow,iColumn+2,TClr,2
| > > IHex iRow,iColumn+5,TClr,2
| > > case 5
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+3,TClr,3
| > > case 6
| > > IHex iRow,iColumn,TClr,2
| > > case 7
| > > IHex iRow,iColumn+4,TClr,2
| > > case 8
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 9
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > end select
| > > case 6
| > > select case valChar
| > > case 0
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 1
| > > IHex iRow,iColumn+3,TClr,2
| > > case 2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 3
| > > IHex iRow,iColumn+3,TClr,3
| > > case 4
| > > IHex iRow,iColumn+2,TClr,2
| > > IHex iRow,iColumn+5,TClr,2
| > > case 5
| > > IHex iRow,iColumn,TClr,7
| > > case 6
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+3,TClr,3
| > > case 7
| > > IHex iRow,iColumn+4,TClr,2
| > > case 8
| > > IHex iRow,iColumn+1,TClr,6
| > > case 9
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+5,TClr,3
| > > end select
| > > case 7
| > > select case valChar
| > > case 0
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 1
| > > IHex iRow,iColumn+3,TClr,2
| > > case 2
| > > IHex iRow,iColumn+5,TClr,2
| > > case 3
| > > IHex iRow,iColumn+3,TClr,4
| > > case 4
| > > IHex iRow,iColumn+1,TClr,2
| > > IHex iRow,iColumn+5,TClr,2
| > > case 5
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 6
| > > IHex iRow,iColumn,TClr,7
| > > case 7
| > > IHex iRow,iColumn+3,TClr,2
| > > case 8
| > > IHex iRow,iColumn+1,TClr,6
| > > case 9
| > > IHex iRow,iColumn+1,TClr,7
| > > end select
| > > case 8
| > > select case valChar
| > > case 0
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 1
| > > IHex iRow,iColumn+3,TClr,2
| > > case 2
| > > IHex iRow,iColumn+4,TClr,2
| > > case 3
| > > IHex iRow,iColumn+6,TClr,2
| > > case 4
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+5,TClr,2
| > > case 5
| > > IHex iRow,iColumn+6,TClr,2
| > > case 6
| > > IHex iRow,iColumn,TClr,3
| > > IHex iRow,iColumn+6,TClr,2
| > > case 7
| > > IHex iRow,iColumn+3,TClr,2
| > > case 8
| > > IHex iRow,iColumn,TClr,2
| > > IHex iRow,iColumn+6,TClr,2
| > > case 9
 
M

Murray

I use -

What is the name of the day that comes after Thursday -> and validate for
"Friday" or "friday".

Or, I use -

<select>
<option>*** Please select the correct function ***</option>
<option>Do not submit this form</option>
<option>Do submit this form</option>
</select>

and validate for the "Do submit this form" option. Note - THIS VALIDATION
MUST BE DONE SERVER-SIDE, and not client side.
 
J

Jens Peter Karlsen [FP-MVP]

Or to be safe validate for friday and use tolowercase on the input
string.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
M

Murray

Yes.

--
Murray
--------------
MVP FrontPage


Jens Peter Karlsen said:
Or to be safe validate for friday and use tolowercase on the input
string.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
G

Guest

Hi Murray,

I used your code on my form. I cut and pasted it into the "disc_post"
document. I changed the question to "what day comes after Thursday" and
adjusted the answers on the drop-down menu.
However, I don't know how to do server side validation. I am doing some
google research to see what I can find, but so far the codes are long it all
seems quite complicated---like I need programing skills or something. Do you
know a straight-forard way to validate for "friday" on a server? What's the
code?
Thanks,
 
S

Stefan B Rusynko

You don't need server side validation for that
If you are using a FP form field just select the form field, right click for Form Field Validation and enter the required value in
the Data value

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Hi Murray,
|
| I used your code on my form. I cut and pasted it into the "disc_post"
| document. I changed the question to "what day comes after Thursday" and
| adjusted the answers on the drop-down menu.
| However, I don't know how to do server side validation. I am doing some
| google research to see what I can find, but so far the codes are long it all
| seems quite complicated---like I need programing skills or something. Do you
| know a straight-forard way to validate for "friday" on a server? What's the
| code?
| Thanks,
|
| "Murray" wrote:
|
| > Yes.
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Or to be safe validate for friday and use tolowercase on the input
| > > string.
| > >
| > > Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
| > >
| > > On Thu, 4 Jan 2007 07:22:09 -0500, "Murray"
| > >
| > >>I use -
| > >>
| > >>What is the name of the day that comes after Thursday -> and validate for
| > >>"Friday" or "friday".
| > >>
| > >>Or, I use -
| > >>
| > >><select>
| > >> <option>*** Please select the correct function ***</option>
| > >> <option>Do not submit this form</option>
| > >> <option>Do submit this form</option>
| > >></select>
| > >>
| > >>and validate for the "Do submit this form" option. Note - THIS VALIDATION
| > >>MUST BE DONE SERVER-SIDE, and not client side.
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top