1

I'm trying to load in a html a JSON file with a editable form but without sucess.

This is the form (JSON file - CompleteForm2014.json)

{"type":"Design","zone":null,"children":[{"type":"Page","properties":{"id":"page1"},"children":[{"type":"Content","zone":"content","children":[{"type":"CheckboxGroup","children":[{"type":"Checkbox","properties":{"id":"checkbox1"}},{"type":"Checkbox","properties":{"id":"checkbox2"}},{"type":"Checkbox","properties":{"id":"checkbox3"}}]},{"type":"CheckboxGroup","children":[{"type":"Checkbox","properties":{"id":"checkbox4"}},{"type":"Checkbox","properties":{"id":"checkbox5"}},{"type":"Checkbox","properties":{"id":"checkbox6"}}]}]}]}],"pInfo":{"name":"CompleteForm2014","theme":"Default","accessDate":1404304220520,"device":{"name":"Phones","screenWidth":320,"screenHeight":480,"rotating":false}}}

and this is my HTML file that is supose to load the JSON:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">    
    <head>
        <title>title</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <script src="lib/jquery-1.6.4.js"></script>
        <script src="lib/jquery.mobile-1.1.0.js"></script>
        <link href="src/css/jquery.mobile.structure-1.1.0.css" rel="stylesheet"
        />
        <link href="src/css/jquery.mobile.theme-1.1.0.css" rel="stylesheet" />
    </head>    
    <body> 
    </body>
</html>
<script>
var diagnoseForm = (function () {
    var diagnoseForm = null;
    $.ajax({
        'async': false,
        'global': false,
        'url': "../js/CompleteForm2014/CompleteForm2014.json",
        'dataType': "json",
        'success': function (data) {
            diagnoseForm = data;
        }
    });
    alert(diagnoseForm);
    return diagnoseForm;
})();
</script>

Any one can help me ?..i just see a blank page and i wanto to see six checkbox that is a form...

Bordanenko
  • 11
  • 2

0 Answers0