Help...Classic ASP...No Validation form, can't pass CAPTCHA to go next page with form after reCAPTCHA

321 views
Skip to first unread message

ConfusedGury

unread,
Mar 12, 2012, 7:05:02 PM3/12/12
to reCAPTCHA
Can anyone help me tweak Classic ASP in the Google-provided skeleton
on the http://code.google.com/apis/recaptcha/docs/asp.html link?
Everything entered in the CAPTCHA, even leaving it blank, passes right
now. I read that I needed to put the form at the end of the skeleton
code instead of the middle, but that does not work. I'm thoroughly
frustrated and confused. I tried using "GET" rather than "POST" but
nothing works for me.

My problem and goal:

I do not want to submit any form, but to put the CAPTCHA at the bottom
of the page BEFORE my from...let's call that page "CurrentPage1.asp"
at this time.

So you have to pass the CAPTCHA to get to the second page with the
form, call it "NextPage2.asp" for coding purposes.

Yes, I put my public key and private key in the proper places and in
the header. I'd like for the code to kick back to the same
"CurrentPage1.asp" if the CAPTCHA fails. However, when it passes,
redirect to "NextPage2.asp" to view my form and enter and submit info
as usual.

I though that this should be easy, and I wish Google would have posted
it as an example of what works...instead of the skeleton...so dummies
like me who understand the concepts but not the fine details of
Classic ASP could use it and learn.

Thenks for any advice. Here is the skeleton Google provides:

<html>
<body>

<% if server_response <> "" or newCaptcha then %>

<% if newCaptcha = False then %>

<!-- An error occurred -->
Wrong!

<% end if %>

<% else %>

<!-- The solution was correct -->
Correct!

<!-- Generating the form -->
<form action="recaptcha.asp" method="post">
<%=recaptcha_challenge_writer()%>
</form>

<%end if%>

</body>
</html>

PJH

unread,
Mar 12, 2012, 7:16:27 PM3/12/12
to reca...@googlegroups.com


On Mon, Mar 12, 2012 at 11:05 PM, ConfusedGury <garyj...@aol.com> wrote:
I do not want to submit any form, but to put the CAPTCHA at the bottom
of the page BEFORE my from...let's call that page "CurrentPage1.asp"
at this time.

So you have to pass the CAPTCHA to get to the second page with the
form, call it "NextPage2.asp" for coding purposes.

Yes, I put my public key and private key in the proper places and in
the header.  I'd like for the code to kick back to the same
"CurrentPage1.asp" if the CAPTCHA fails.  However, when it passes,
redirect to "NextPage2.asp" to view my form and enter and submit info
as usual.

Put all the code in the same page?

If there's no captcha entered, or the previous attempt failed,
     do the first lot of code,
otherwise
    do the second.

There's a php example of this method at http://www.spectrum-nashville.com/reCAPTCHA/demo.php

--
PJH


ConfusedGury

unread,
Mar 12, 2012, 8:22:17 PM3/12/12
to reCAPTCHA
On your example demo.php, I would not have the name and email
fields...just the reCAPTCHA at the bottom of the page as a gatekeeper
if you will...which when successfully validated would take you to the
next page that would have my form, and in this instance, the name and
email fields. Hope I am as clear I can be. Let me know. Thanks

On Mar 12, 7:16 pm, PJH <pauljherr...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages