JSON problem

JSON problem

lordcaballolordcaballo Posts: 4Questions: 0Answers: 0
edited September 2013 in General
Hello!

I just created a "Generator" (http://editor.datatables.net/generator/) download package.
Then I changed the mySQL database info in /php/lib/config.php, created the DB and uploaded all to my website.

Sadly all I get is a: <>

What is wrong? What can I change or modify??

If you need the URL, is: http://www.diego-garcia-calleja.webege.com/languages/prueba/palabras.html

Thanks for your help! :D

Replies

  • lordcaballolordcaballo Posts: 4Questions: 0Answers: 0
    It's also not reading the DB :/
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Do some debugging. Firebug says this:

    Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/a6718958/public_html/languages/prueba/php/table.palabras.php on line 13
  • lordcaballolordcaballo Posts: 4Questions: 0Answers: 0
    This is what is inside that file...what should I change??

    [code]
    /*
    * Editor client script for DB table palabras
    * Automatically generated by http://editor.datatables.net/generator
    */

    (function($){

    $(document).ready(function() {
    var editor = new $.fn.dataTable.Editor( {
    "ajaxUrl": "php/table.palabras.php",
    "domTable": "#palabras",
    "fields": [
    {
    "label": "Language",
    "name": "language",
    "type": "text"
    },
    {
    "label": "Phrase",
    "name": "phrase",
    "type": "text"
    },
    {
    "label": "English translation",
    "name": "translation",
    "type": "text"
    }
    ]
    } );

    $('#palabras').dataTable( {
    "sDom": "Tfrtip",
    "sAjaxSource": "php/table.palabras.php",
    "aoColumns": [
    {
    "mData": "language"
    },
    {
    "mData": "phrase"
    },
    {
    "mData": "translation"
    }
    ],
    "oTableTools": {
    "sRowSelect": "multi",
    "aButtons": [
    { "sExtends": "editor_create", "editor": editor },
    { "sExtends": "editor_edit", "editor": editor },
    { "sExtends": "editor_remove", "editor": editor }
    ]
    }
    } );
    } );

    }(jQuery));
    [/code]
  • allanallan Posts: 63,508Questions: 1Answers: 10,471 Site admin
    Based on that error, it seems very likely to me that you are using a very old version of PHP (5.2 or before). Given that 5.2 has been dead for years and no longer supported, I've very much suggest upgrading! The newer versions of PHP add a lot of great features (which the Editor libraries make use of to prevent a nice clean API).

    Allan
  • lordcaballolordcaballo Posts: 4Questions: 0Answers: 0
    Thanks a lot for your replies!
This discussion has been closed.