Hello,
I'm using a Zoho contact form code on a Contao site, and a server error comes up when saving a piece of javascript in a Code element. Has anybody else had issues with javascript on their Contao site?
Here's the error:
-----
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@domain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
-----
Here's the script that lives inside the form:
<script> var mndFileds=new Array('Last Name');
var fldLangVal=new Array('Last Name');function checkMandatery()
{for(i=0;i<mndFileds.length;i++){ var fieldObj=document.forms['WebToContacts635172000000056059'][mndFileds[i]];
if((fieldObj) && ((fieldObj.value).replace(/^\s+|\s+$/g, '')).length==0){alert(fldLangVal[i] +' cannot be empty'); fieldObj.focus();
return false;}
else if(fieldObj && (fieldObj.nodeName=='SELECT') && (fieldObj.options[fieldObj.selectedIndex].value=='-None-')){alert(fldLangVal[i] +' cannot be none'); fieldObj.focus();
return false;}}}
</script>
Bookmarks