Improve company productivity with a Business Account.Sign Up

x
?
Solved

ASP: I am trying to insert Captcha into my form and submit the form

Posted on 2011-09-16
3
Medium Priority
?
317 Views
Last Modified: 2012-05-12
I am trying to insert Captcha into my form and submit the form for to action="procformNews.asp"

my index.asp seems to work and the captcha works, submitting to the example_process_form,
which verifies if the captcha security code was accepted or not. But the submit form in the file
example_process_form  ... called 'procformNews.asp' is not submitting the form in the file index.asp??

<form action="procformNews.asp" method="post" name="form1" id="form1">

what am I do wrong?


+++++++++++++++++++++++++++++++++++++
index.asp
+++++++++++++++++++++++++++++++++++++

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Include file for CAPTCHA configuration -->
<!-- #include file="CAPTCHA/CAPTCHA_configuration.asp" --> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>West Design - Web Design, Web Applications Development, Graphic Design for Small Business - Medford, Ashland, Eagle Point, Rogue Valley, Southern Oregon</title>


<link href="wd-style-combined.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="http://use.typekit.com/mem8tms.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>

<noscript>
<a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a>
</noscript>
<script type="text/javascript">var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<!-- (c) 2007, http://deluxe-menu.com --> 

</head>

<body>
<center>
<form action="example_process_form.asp" method="post" name="form1" id="form1">
<table border="0"> 
<tr><td width="38" align="right"> Full Name</td><td width="160" align="left"> <input class="spacing" Name="fullname" type="text" size="20" /></td></tr>
<!--<tr><td width="38" align="right">Last Name</td><td width="160" align="left"> <input class="spacing" Name="lastName" type="text" size="20" /></td></tr>-->

<tr><td width="38" align="right">Email</td><td width="160" align="left"><input Name="email" class="spacing" type="text" size="20" value="Enter your email" /></td></tr>

<tr><td colspan="2" align="center"><input Name="maillist" value="WestDesign_Business_Newsletter" type="hidden"/>

<input Name="fromemailaddr" value="news@dianewestdesign.com" type="hidden"/>

<input Name="Nameofnewsletter" value="West Design" type="hidden"/>

<input Name="URl" value="http://www.dianewestdesign.com/" type="hidden"/>

   <!-- include the Web Wiz CAPTCHA form element -->
   <!--#include file="CAPTCHA/CAPTCHA_form_inc.asp" -->
  
<input type="submit" value="Sign Me Up!"></td></tr>
<tr>
<td colspan="2" align="center"><p class="centered"><a href="newsletter-archive.html">View a recent issue</a></p></td></tr></table>

</form>
</div>
</body>
</html>

+++++++++++++++++++++++++++++++++++++
example_process_form
+++++++++++++++++++++++++++++++++++++

<%@LANGUAGE="VBSCRIPT" %>
<!-- Include file for CAPTCHA configuration -->
<!-- #include file="CAPTCHA/CAPTCHA_configuration.asp" --> 
 
<!-- Include file for CAPTCHA form processing -->
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->           
<%

'The line below will prevent the rest of the file from processing if the CAPTCHA code is entered incorrectly
'To use the line below remove the comment (') quote mark from in front of the line 
'If blnCAPTCHAcodeCorrect = False Then Call stopProcess()
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Web Wiz CAPTCHA Demo</title>
<style type="text/css">
<!--
.title {font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }
.header {font-family: Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold; }
.text {font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
.small {font-size: 10px}
body { background-color: #CCCCCC; }
-->
</style>
</head>
<body>
<div align="center" class="header"> Web Wiz CAPTCHA <br />
  <br />
</div>
<form action="procformNews.asp" method="post" name="form1" id="form1">
  <table width="300" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
    <tr>
      <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr>
            <td><span class="title">Demo Form</span></td>
          </tr>
          <tr>
            <td><span class="text">Thank-you
              <% = Server.HTMLEncode(Request("fullname")) %><br />
              <% = Server.HTMLEncode(Request("email")) %><br />

              <% = Server.HTMLEncode(Request("maillist")) %><br />
              <% = Server.HTMLEncode(Request("fromemailaddr")) %><br />
              <% = Server.HTMLEncode(Request("Nameofnewsletter")) %><br />
              <% = Server.HTMLEncode(Request("URl")) %>

              </span></td>
          </tr>
          <tr>
            <td class="text"><br />
              The CAPTCHA image code was entered:-<br />
              <span class="title"><%


'The variable 'blnCAPTCHAcodeCorrect' will be set to true if the security code is entered correctly

If blnCAPTCHAcodeCorrect Then 
	
	Response.Write("Correctly")
   
Else

	Response.Write("Incorrectly!!")
End If
              
              %></span><br />
              <br />
              <a href="index.asp">Return</a><br />
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>

Open in new window

0
Comment
Question by:westdh
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
nishant joshi earned 2000 total points
ID: 36549109
<form action="procformNews.asp" method="get" name="form1" id="form1">
0
 

Author Comment

by:westdh
ID: 36549705
the 'get' in the second form

<form action="procformNews.asp" method="get" name="form1" id="form1">
did not submit the form.

the added captcha code works. but this form does not and how does it get submitted???
0
 

Author Closing Comment

by:westdh
ID: 36551502
Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …

606 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question