Results 1 to 2 of 2

Thread: Javascript Code

  1. #1
    New user
    Join Date
    03-31-11.
    Posts
    2

    Default Javascript Code

    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>

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    328

    Default Re: Javascript Code

    Did you add the <script> tag in the allowed tag list under Settings?
    Consulenza Contao CMS https://www.intco.it

Bookmarks

Posting Permissions

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