Solved

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

Posted on 2011-09-16
3
305 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 500 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help editing script 3 80
Server Timeout with Loop 6 52
Problem to open text file 11 128
VS2015 Redefinition errors 4 71
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

829 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