Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 18th, 2012, 05:23 AM
Authorized User
 
Join Date: Dec 2009
Posts: 85
Thanks: 16
Thanked 0 Times in 0 Posts
Default captcha

Hi there


I'm using this 3rd party asp captcha function and the check goes like this:




strCAPTCHA = Trim(Request.Form("strCAPTCHA"))
if CheckCAPTCHA(strCAPTCHA) = true then

else

%>
<script language="Javascript">
window.alert("Verification Failed.")
window.history.go(-1);
</script>
<%

response.End()

end if

%>

However, what I'd like it to do is refresh the current page but without losing the form data and so that the captcha random letters are changed - can anyone advise

thanks

Adam
 
Old September 18th, 2012, 06:44 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

You will need to pass the form values. Simply submit the form and then detect if the request.form fields have values and print them if so EG:

Code:
<input type="text" name="cName" size="27" <% if trim(request.form("cName")) <> "" then %> value="<%= trim(request.form("cName")) %>" <% end if %> title="Enter your name, this field is required." maxlength="50">
IMO the window.history.go(-1); part of the code you have is not idel, if I were you I would use pure ASP code. here is where you can get very good Pure classic ASP code you are looking for. its the one I use:


http://www.tipstricks.org/
__________________
Wind is your friend
Matt
 
Old September 19th, 2012, 05:09 AM
Authorized User
 
Join Date: Dec 2009
Posts: 85
Thanks: 16
Thanked 0 Times in 0 Posts
Default captcha

thanks Mat

I'll check it out.





Similar Threads
Thread Thread Starter Forum Replies Last Post
captcha.php andrewfarq BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 4 October 19th, 2010 01:06 PM
captcha digink BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 December 15th, 2009 06:25 AM
Captcha wulm4321 BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 1 November 29th, 2009 09:37 PM
CAPTCHA Code MunishBhatia ASP.NET 2.0 Basics 2 December 24th, 2007 03:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.