Print Page | Close Window

Load New Code

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz CAPTCHA
Forum Description: Support forum for the Web Wiz CAPTCHA security image.
URL: https://forums.webwiz.net/forum_posts.asp?TID=27885
Printed Date: 28 March 2026 at 2:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Load New Code
Posted By: sarb
Subject: Load New Code
Date Posted: 28 September 2009 at 11:30pm
I just set up a page using the Captcha code.  I am not a programmer by any means, so this has been a very slow process for me Smile.

I notice when the page with the form opens, it has the following text next to the image box
" javascript:reloadCAPTCHA%28%29;" rel="nofollow - Load New Code ".  I'm not really following why that is there.  Does the client filling out the form have the option to change the code in the box at his discretion and if so why is that...

the page can be viewed at:

http://www.oaknoll.com/hawkeye_birthday_page2.asp

This is a experimental page.  I will put the code on the real page after I figure out wheather I am doing this correctly or not.

Thanks,
sarb



Replies:
Posted By: WebWiz-Bruce
Date Posted: 29 September 2009 at 9:01am
The Load New Code option is there in case the user can not read the CAPTCHA code they can create a new one.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: sarb
Date Posted: 29 September 2009 at 2:26pm
Is there a way to remove that if my client doesn't want it to appear there?

Thanks,
Sarb


Posted By: WebWiz-Bruce
Date Posted: 29 September 2009 at 3:12pm
You could edit the CAPTCHA_form_inc.asp and remove the link.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: sarb
Date Posted: 29 September 2009 at 8:55pm
Is there a way to validate this code so that it won't submit if this captcha box isn't filled out?  I see there is a code in php, but my clients server won't work with that format.   Needs to be ASP


Posted By: WebWiz-Bruce
Date Posted: 30 September 2009 at 9:48am
PHP code is server side so the page would still submit.

What you need to do to prevent the form form submitting if the CAPTCHA textbox is empty is to use JavaScript on the client side.

If you are already using JavaScript to detect if the other form elements are filled in then you just need to add to this some JavaScript to also detect if the textbox has a value. The textbox is called 'securityCode'. The code would like like below:-

<script  language="JavaScript" type="text/javascript">
<!--
function CheckForm () {

var errorMsg = "";

if (document.frmEnquiry.securityCode.value == "") {
errorMsg += "\n\tSecurity Code \t- Enter the security code exactly as you see it in the image";
}

if (errorMsg != ""){
msg = "______________________________________________________________\n\n";
msg += "Your enquiry has not been sent because there are problem(s) with the form.\n";
msg += "Please correct the problem(s) and re-submit the form.\n";
msg += "______________________________________________________________\n\n";
msg += "The following field(s) need to be corrected: -\n";

errorMsg += alert(msg + errorMsg + "\n\n");
return false;
}

return true;
}
// -->
</script>


You then add the following to your <form...... tag so that the javascript function is called when the form is submitted:-

onsubmit="return CheckForm();"



-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net