Popular Searches: FrontPage Hosting | FrontPage Templates | FrontPage Training | Free FrontPage

Spam Protection Question in Form   Logged in as: Guest
  Printable Version
All Forums >>FrontPage Specific Issues >>FrontPage 2003 >> Page: [1] 2    >   >>
Name:
Message<< Newer Topic  Older Topic >>

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

Spam Protection Question in Form 

I added a spam protection question to one of my forms. For example:

Is fire hot or cold.

I set the validation to
REQUIRED
EQUAL TO
Hot

This probably will work ok for robots which is the whole idea. However, if someone enters cold, the validation message pops up and says, Please enter HOT.

My question here is, how to I hide the answer in the validation window. How do I make the window simply say something like, INCORRECT ANSWER

Cheers
  Report Abuse |  Date: 7/31/2008 6:58:27 AM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

This is really easy.
The images are generated programatically--no separate image files.
Solve the captcha to download the code in a zip.
http://www.texaswebdevelopers.com/captcha/form.asp
Just add your form fields to the existing form--post to the same form page--on "success" stick the variables into a database; send an email; or pass to another page; then redirect to your thank-you page with
<% Response.redirect("thankyou_page.asp") %> (just stick this where the "success" text now is).


< Message edited by TexasWebDevelopers -- 7/31/2008 11:09:09 AM >



_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 7/31/2008 11:05:35 AM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to TexasWebDevelopers

Thanks TWD.

Perhaps I should have been clearer. The form I am referring to is created in FP2003.

Cheers
  Report Abuse |  Date: 7/31/2008 12:40:58 PM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

So?
Just delete all of the comments (so you can see the code better) and copy the form fields , etc. into the example.
BTW, FP forms are really the easiest to use SQL injection on...so if you are going into a database you need to strip out a series of characters that are commonly used.
Anyway, taking your existing form and incorporating the CAPTCHA into it would take less than five minutes.


_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 7/31/2008 1:08:05 PM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to TexasWebDevelopers

Solve the captcha to download the code in a zip?


Delete the comments?
  Report Abuse |  Date: 7/31/2008 1:24:13 PM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

Solve the CAPTCHA--you know, type in the correct numerals--and you'll get "thank you" text along with a link to download the files in a .zip format.
http://www.texaswebdevelopers.com/captcha/form.asp


< Message edited by TexasWebDevelopers -- 7/31/2008 2:49:30 PM >



_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 7/31/2008 2:48:50 PM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to TexasWebDevelopers

Never heard it called that


And the, "Delete the comments"?
  Report Abuse |  Date: 7/31/2008 2:55:40 PM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

From the wonderful world of Wikipedia:
quote:

A CAPTCHA is a type of challenge-response test used in computing to ensure that the response is not generated by a computer. The process involves one computer (a server) asking a user to complete a simple test which the computer is able to generate and grade. Because other computers are unable to solve the CAPTCHA, any user entering a correct solution is presumed to be human. A common type of CAPTCHA requires that the user type the letters or digits of a distorted image that appears on the screen.

The term "CAPTCHA" was coined in 2000 by Luis von Ahn, Manuel Blum Nicholas J. Hopper (all of Carnegie Mellon University), and John Langford (then of IBM). It is a contrived acronym for "Completely Automated Public Turing test to tell Computers and Humans Apart". The term was attempted to be trademarked by Carnegie Mellon University, however the trademark application was abandoned on April 21st, 2008.

A CAPTCHA is sometimes described as a reverse Turing test, because it is administered by a machine and targeted to a human, in contrast to the standard Turing test that is typically administered by a human and targeted to a machine.


Delete the FrontPage generated comments on your web page to get that stuff out of the code. Also called the Spooky Diet from Spooky on Thomas Brunt's website:
http://www.outfront.net/spooky/adv_drw.htm

A comment looks like this:
<!-- comment goes here-->
On a typical FrontPage DRW page there are more comments than code!
Comments can also be used to prevent users from changing Front Page code when used as old-fashioned "check sums".
Anyway--you can delete ALL of the comments--it will make your page load faster and make the REAL code easier to see and work with.
This is ASP code:
<%= a bunch of code%>
It has carats and percentage signs while a comment always starts with a carat and exclaimation point and two dashes.
Don't delete ASP code.
An include file also looks similar but has a pound sign (#) and says "include":
<!--#include file="mypage.asp" -->


< Message edited by TexasWebDevelopers -- 7/31/2008 3:12:49 PM >



_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 7/31/2008 3:06:47 PM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to TexasWebDevelopers

ah...now I understand what you mean. Yes, I know what comments are. However, back to my original question. Is there a way to hide the validation message that explicity says what answer to enter in the question as opposed to just saying something like, "invalide answer" with in the FP form?

Here is an example of what I am referring to:
http://timothydehan.com/test/index.htm

If for example you enter anything but "cold" in the Question field it say to enter "cold".

PS... the Spooky Diet does nothing to this test page. Also, not even clear after reading muliple posts what that is suppose to do anyway related to my application.

I am not writing to a database other than the .csv file in the _private folder as this is just being sent via email.


< Message edited by tonymuffin -- 7/31/2008 5:45:29 PM >
  Report Abuse |  Date: 7/31/2008 3:18:36 PM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

You know, I've got to start reading your questions better.
I was making this way too difficult for you and I'm sorry.
My clients want more bullet-proof applications than this but you really just want to know how to change the text in an alert.
Fin the laert in the code:
alert("Please enter a value equal to \"cold\" in the \"Question\" field.");
Change to:
alert("Please enter the correct password.");

You will notice that the back-slashes are used to "escape" the quote marks in the original text.


< Message edited by TexasWebDevelopers -- 8/1/2008 8:45:14 AM >



_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 8/1/2008 8:39:43 AM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to TexasWebDevelopers

Yup...that is all I was asking.

However, it appears I am still not asking this right....

This is a FP form
There is nothing on the page that says ALERT as you indicate.
Where in a FP form will I find the place to make the edit? I guess it is in the webot?

And it's apparent you must find this hard to believe. But I do design some very nice applications.

Cheers


< Message edited by tonymuffin -- 8/1/2008 9:01:26 AM >
  Report Abuse |  Date: 8/1/2008 8:58:04 AM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

Well--can you post the page code? Maybe it's there and not embedded in the back end.
I haven't used a FP form in 10 years and since the FP extensions are being phased out I'm not really gonna start now--however, I really would like to help you get this done today.


< Message edited by TexasWebDevelopers -- 8/1/2008 5:00:40 PM >



_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 8/1/2008 12:11:33 PM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to TexasWebDevelopers

I posted the page a couple posts ago, http://timothydehan.com/test

I didn't phrase my response correctly. There is indeed an ALERT if you open the index.htm file in a text editor. When I make the change as you suggested, save the file and copy back to the server. The edits are not kept.
  Report Abuse |  Date: 8/1/2008 2:40:03 PM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

Delete the comments from the page. There is a check sum that is preventing the changes from sticking.

You are right, the html page code is the same as view source.


< Message edited by TexasWebDevelopers -- 8/1/2008 5:01:58 PM >



_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 8/1/2008 3:29:05 PM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to TexasWebDevelopers

I can certainly do that. However, opening the page per the URL I gave, View Source, Save AS index.htm will give you exactly the same thing.
  Report Abuse |  Date: 8/1/2008 4:36:19 PM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

Try this.
All I have done is strip out the comments and change the alert as I suggest you do earlier.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.T1.value == "")
{
alert("Please enter a value for the \"Text 1\" field.");
theForm.T1.focus();
return (false);
}

if (theForm.T1.value.length < 4)
{
alert("Please enter at least 4 characters in the \"Text 1\" field.");
theForm.T1.focus();
return (false);
}

if (theForm.T1.value.length > 4)
{
alert("Please enter at most 4 characters in the \"Text 1\" field.");
theForm.T1.focus();
return (false);
}

var chkVal = theForm.T3.value;
var prsVal = chkVal;
if (chkVal != "" && !(prsVal == "cold"))
{
alert("Please give the correct password.");
theForm.T3.focus();
return (false);
}
return (true);
}
//-->
</script>
<form method="POST" action="_vti_bin/shtml.dll/index.htm" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" webbot-action="--WEBBOT-SELF--">
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">
<table border="0" width="600" id="table1">
<tr>
<td><font face="Verdana" size="1">Text 1</font></td>
<td><input type="text" name="T1" size="20" style="font-family: Verdana; font-size: 8pt" tabindex="1" maxlength="4"></td>
</tr>
<tr>
<td><font face="Verdana" size="1">Text 2</font></td>
<td><input type="text" name="T2" size="20" style="font-family: Verdana; font-size: 8pt" tabindex="2"></td>
</tr>
<tr>
<td><font face="Verdana" size="1">Text Area</font></td>
<td><textarea rows="2" name="S1" cols="39" style="font-family: Verdana; font-size: 8pt" tabindex="3"></textarea></td>
</tr>
<tr>
<td><font face="Verdana" size="1">Check</font></td>
<td><input type="checkbox" name="C1" value="Checked" tabindex="4"></td>
</tr>
<tr>
<td><font face="Verdana" size="1">Drop Down</font></td>
<td>
<select size="1" name="D1" style="font-family: Verdana; font-size: 8pt" tabindex="5">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</td>
</tr>
<tr>
<td><font face="Verdana" size="1">Question:<br>
Is ice Hot or Cold?</font></td>
<td><input type="text" name="T3" size="20" style="font-family: Verdana; font-size: 8pt" tabindex="6"></td>
</tr>
</table>
<p>
<input type="submit" value="Submit" name="B1" tabindex="7" style="font-family: Verdana; font-size: 8pt"><input type="reset" value="Reset" name="B2" tabindex="8" style="font-family: Verdana; font-size: 8pt"></p>
</form>
</body>
</html>


< Message edited by TexasWebDevelopers -- 8/1/2008 5:03:00 PM >



_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 8/1/2008 4:58:50 PM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to tonymuffin

Trying to run this page now, http://timothydehan.com/test

returns the following:

Cannot run the FrontPage Server Extensions on this page: "http://timothydehan.com/test/index.htm"
  Report Abuse |  Date: 8/1/2008 5:06:56 PM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Spam Protection Question in Form (in reply to tonymuffin

I left out the webbot to send to the results page -- right after the form header
somethine like -- but since you didn't post your code to the site I can't refer back to the original. You might try this...
<!--webbot bot="SaveResults" U-File="......../_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->


_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 8/1/2008 6:12:53 PM

tonymuffin

 

Posts: 78
Member since: 2/19/2008
 

RE: Spam Protection Question in Form (in reply to tonymuffin

Ahhhhhhhhhh. But I thought you said,

quote:

My clients want more bullet-proof applications than this




So, again, I have no idea what you are referring to, "Since I don't post code to the site"?

so perhaps again I am not explaing this well at all. If you had filled out and submitted my sample test page from the previous above URL you would see the behavior and results.

Here is a test URL to the previous index.htm page prior to adding your code.
http://timothydehan.com/test/index2.htm

One more thing I might ad... MS is not phasing out FP server extensions.


< Message edited by tonymuffin -- 8/2/2008 6:24:04 AM >
  Report Abuse |  Date: 8/1/2008 6:40:01 PM

Rick_E

 

Posts: 3777
Member since: 2/14/2004
 

RE: Spam Protection Question in Form (in reply to tonymuffin

For what it's worth, I've found that requiring the validation field like you already have eliminates the robots and 99% of the spam entries. So you might try it for awhile with what you already have.

I require a four digit integer number as validation that is greater than 2007 and less than 2009 and I place a GIF image next to the validation field that says

"Please enter the code 2008 in the validation field:"

Not industrial strength, but works for me


< Message edited by Rick_E -- 8/2/2008 5:29:26 AM >



_____________________________

All the best, Rick E

Search Microsoft KB for error msgs
http://support.microsoft.com/search/default.aspx?catalog=LCID%3D1033&spid=919&adv=1
  Report Abuse |  Date: 8/2/2008 4:56:30 AM
Page:   [1] 2    >   >>
All Forums >>FrontPage Specific Issues >>FrontPage 2003 >> Page: [1] 2    >   >>
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



Forum Software powered by ASP Playground Advanced Edition 2.0.5
Copyright © 2000 - 2003 ASPPlayground.NET

0.09375