Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-09-16
3
Medium Priority
?
313 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
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…
Integration Management Part 2

772 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