Reset Button
Is there an easy way to add a reset button that looks like the submit image in the Contact form solutions pack. This is the text I have now.
<a href="contactus.php">Reset the Code</a>
Is there an easy way to add a reset button that looks like the submit image in the Contact form solutions pack. This is the text I have now.
<a href="contactus.php">Reset the Code</a>
If you want a button that just resets the form (but won't reset the captcha image):
Insert > Form > Button - and in the Properties Panel/Inspector set the action to 'Rest Form'
Make sure that the button is inside the form tags.
Insert a button - Insert > Form > Button
In Properties Panel/Inspector, for 'Action' select 'None' - give it a value, i.e 'Reset'.
Go to Window > Behaviors and in the Behaviors Panel, click the plus sign and from the options select 'Go to URL'. Enter 'contactus.php' for the URL.
In your contact_styled.php page, you will have to find the image code:
<img src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=<?php echo $WAGLOBAL_Captcha_Noise; ?>&bgcolor=<?php echo $WAGLOBAL_Captcha_BG; ?>&textcolor=<?php echo $WAGLOBAL_Captcha_Text; ?>&transparent=<?php echo $WAGLOBAL_Captcha_BG_transparent; ?>&characters=<?php echo $WAGLOBAL_Captcha_Characters; ?>&width=<?php echo $WAGLOBAL_Captcha_Width; ?>&height=<?php echo $WAGLOBAL_Captcha_Height; ?>&font=<?php echo $WAGLOBAL_Captcha_Font; ?>" alt="security code"/>
Add an id to it like this:
<img src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=<?php echo $WAGLOBAL_Captcha_Noise; ?>&bgcolor=<?php echo $WAGLOBAL_Captcha_BG; ?>&textcolor=<?php echo $WAGLOBAL_Captcha_Text; ?>&transparent=<?php echo $WAGLOBAL_Captcha_BG_transparent; ?>&characters=<?php echo $WAGLOBAL_Captcha_Characters; ?>&width=<?php echo $WAGLOBAL_Captcha_Width; ?>&height=<?php echo $WAGLOBAL_Captcha_Height; ?>&font=<?php echo $WAGLOBAL_Captcha_Font; ?>" alt="security code" id="captchaImage" />
Then you will have to add a script like this:
<script language="JavaScript">
function reloadImage() {
var now = new Date();
if (document) {
document.getElementById('captchaImage').src = "WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=" + "<?php echo $WAGLOBAL_Captcha_Noise; ?>" + "&bgcolor=" + "<?php echo $WAGLOBAL_Captcha_BG; ?>" + "&textcolor=" + "<?php echo $WAGLOBAL_Captcha_Text; ?>" + "&transparent=" + "<?php echo $WAGLOBAL_Captcha_BG_transparent; ?>" + "&characters=" + "<?php echo $WAGLOBAL_Captcha_Characters; ?>" + "&width=" + "<?php echo $WAGLOBAL_Captcha_Width; ?>" + "&height=" + "<?php echo $WAGLOBAL_Captcha_Height; ?>" + "&font=" + "<?php echo $WAGLOBAL_Captcha_Font; ?>" + "&time=" + now.getTime();
}
}
</script>
and a button that calls the reload function like this:
<input type="button" name="Button" id="button" value="Button" onclick="reloadImage()" />
I can get the button working following your instructions but the refreshed image I get is ugly and unreadable.
This is the code that generates my captcha image. It was created with form builder:
<img src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?field=captchaField&transparent=false&noisecolor=99CCCC&noiseorder=0&gridfreq=25&gridcolor=FFFF00&gridorder=0&font=Fonts/MYTYPE.TTF&characters=6&textcolor=333333" alt="Security Code" class="Captcha" id="captchaImage" />
How do I translate that into the js script.
Thanks
change:
document.getElementById('captchaImage').src = "WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=" + "<?php echo $WAGLOBAL_Captcha_Noise; ?>" + "&bgcolor=" + "<?php echo $WAGLOBAL_Captcha_BG; ?>" + "&textcolor=" + "<?php echo $WAGLOBAL_Captcha_Text; ?>" + "&transparent=" + "<?php echo $WAGLOBAL_Captcha_BG_transparent; ?>" + "&characters=" + "<?php echo $WAGLOBAL_Captcha_Characters; ?>" + "&width=" + "<?php echo $WAGLOBAL_Captcha_Width; ?>" + "&height=" + "<?php echo $WAGLOBAL_Captcha_Height; ?>" + "&font=" + "<?php echo $WAGLOBAL_Captcha_Font; ?>" + "&time=" + now.getTime();
to:
document.getElementById('captchaImage').src = "WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=99CCCC&bgcolor=FFFF00&textcolor=333333&transparent=false&characters=6&font=Fonts/MYTYPE.TTF&time=" + now.getTime();
Hope you can help me out here, I get the idea, but having different values than these examples is throwing me off. (just refresh the captcha image only)
<div class="fieldGroup"> <img src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?field=Contact_me_group_Security_code&width=140&height=50&bgcolor=000000&transparent=false&noisefreq=25&gridfreq=50&gridcolor=FFFFFF&gridorder=0&font=Fonts/MODERNA_.TTF&textcolor=990000" alt="Security Code" class="Captcha" /> </div>
you just need to add an id to the image tag:
<div class="fieldGroup"> <img src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?field=Contact_me_gr oup_Security_code&width=140&height=50& bgcolor=000000&transparent=false&noisefreq =25&gridfreq=50&gridcolor=FFFFFF&grido rder=0&font=Fonts/MODERNA_.TTF&textcolor=990000" alt="Security Code" class="Captcha" id="captchaImage" /> </div>
and add the script as:
<script language="JavaScript">
function reloadImage() {
var now = new Date();
if (document) {
document.getElementById('captchaImage').src = "WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?field=Contact_me_gr oup_Security_code&width=140&height=50& bgcolor=000000&transparent=false&noisefreq =25&gridfreq=50&gridcolor=FFFFFF&grido rder=0&font=Fonts/MODERNA_.TTF&textcolor=990000";
}
}
</script>
It works except it resets the formatting on the captcha. How to change that? contact.php
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.