Results 1 to 2 of 2

Thread: Javascript Code

  1. #1
    New user
    Join Date

    Default Javascript Code


    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, 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;}}}

  2. #2
    Join Date

    Default Re: Javascript Code

    Did you add the <script> tag in the allowed tag list under Settings?
    Consulenza Contao CMS


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts