Anti-spambot code

Hi everyone,

In the code below, I’m using javascript to insert the action url on key press for a comments form. This type of code works perfectly well on all other forms on the site but for some reason it won’t work on a comment form, ie. the action doesn’t get inserted.

Just wonderd if anyone could test this code for me to see if it works? The following line of code is also part of the code block. It’s supposed to be located 3 lines above the reference to the jQuery but for some reason site point won’t let me insert it at that point in this post.

    <label>Enter Word Verification in box below {module_captchav2}</label>

Thanks in advance.

  <form name="catratingform2343" onsubmit="return checkWholeForm2343(this)" method="post">
        <div class="columns large-6">
        <div class="row collapse">
        <div class="small-10 columns">
        <input name="FullName" type="text" placeholder="Full Name" />
        </div>
        <div class="small-2 columns"> <span class="postfix radius"><em class="icon-user"></em></span> </div>
        </div>
        <div class="row collapse">
        <div class="small-10 columns">
        <input name="website" type="text" placeholder="Website" />
        </div>
        <div class="small-2 columns"> <span class="postfix radius"><em class="icon-globe"></em></span> </div>
        </div>
        <div class="row collapse">
        <div class="small-10 columns">
        <input placeholder="Email Address" type="text" name="EmailAddress" />
        </div>
        <div class="small-2 columns"> <span class="postfix radius"><em class="icon-envelope"></em></span> </div>
        </div>
        </div>
        <div class="columns large-6">
        <label>
        <textarea class="cat_listbox_large" name="Feedback" placeholder="Comment Here"></textarea>
        </label>
        <input class="button radius" type="submit" value="Submit" />
        </div>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
        <script type="text/javascript">   //<![CDATA[
     
     
            $( "#catratingform2343" ).on( "keypress", function( event ) {
                var action = $("#catratingform2343").attr("action");
                if ( typeof(action) === "undefined" || action === null || action === "" ) {
                    var url = "/RatingProcess.aspx"
                    var params = "?OID={module_oid}&amp;OTYPE={module_otype}";
                    $( "#catratingform2343" ).attr("action",url + params);
                }
    });
     
     
       function checkWholeForm2343(theForm){var why = "";if (theForm.EmailAddress) if (theForm.EmailAddress.value.length > 0) why += checkEmail(theForm.EmailAddress.value);if (theForm.CaptchaV2) why += isEmpty(theForm.CaptchaV2

.value, "Enter Word Verification in box below");if (why != ""){alert(why);return false;}return true;}  
//]]>   </script>
</form>

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.