Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-09-16
3
Medium Priority
?
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

721 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