HTML5 Data Bindings Support Product Page

In progress

HTML5 Data Bindings Not Displaying JSON data

Reported 17 Feb 2015 16:10:22
7
have this problem
17 Feb 2015 16:10:22 Glenn Williams posted:
Hi, I am trying to us the html5 data bindings to display data from a json document but cannot get any data to display in live view.

I have validated my json file and it checks out as valid.


when I try using the repeat region I just see a white page and when I try non-repeated elements I either see - NaN, a white page or the actual code.

I have verified that all scripts are uploaded so I feel like I'm missing something simple.

my os is mac yosemite and dreamweaver cc. Below is some of the code I have tried with no luck.






<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataSet.js"></script>
<script type="text/javascript">
/* dmxDataSet name "transactions-data" */
jQuery.dmxDataSet(
{"id": "transactions-data", "url": "data.json", "data": "", "dataSourceType": "local", "dataType": "json"}
);
/* END dmxDataSet name "transactions-data" */
</script>

<body>

{{transactions-data.TotalResults}}

</body>


thanks in advance

Replies

Replied 12 Apr 2015 11:20:08
12 Apr 2015 11:20:08 Dave Smith replied:
Shot in the dark....

Try removing any hyphens used in data sources, aliases, columns Etc..
Replied 14 Apr 2015 09:40:30
14 Apr 2015 09:40:30 Teodor Kuduschiev replied:
Hi Glenn,
As Dave suggests - the problem is with the "-" in the datasource name please use an underscore "_" instead.
Replied 03 Feb 2016 13:13:49
03 Feb 2016 13:13:49 Colin Miller replied:
I have this problem too. Using OSX Yosemite, Dreamweaver CC 2015.

I have checked that all the scripts in ScriptLibrary have been copied into the directory correctly. There is also an empty 'dmxDatabaseSources' folder which the extension has created, along with an empty 'Styles' one. I have checked that the json is valid, which it is.

When I run the page in the browser it just returns the tag {{monthname}}

Here is my code...

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataSet.js"></script>
<script type="text/javascript">
/* dmxDataSet name "dec" */
jQuery.dmxDataSet(
{"id": "dec", "url": "december.json", "data": "", "dataSourceType": "local", "dataType": "json"}
);
/* END dmxDataSet name "dec" */
</script>
</head>

<body>
<div data-binding-id="repeat1" data-binding-repeat-children="{{dec}}">{{monthname}}</div>
</body>
</html>
Replied 03 Feb 2016 15:24:44
03 Feb 2016 15:24:44 Teodor Kuduschiev replied:
Hi Colin,
Please provide a link to your page, where we can check this.
Replied 03 Mar 2016 15:40:02
03 Mar 2016 15:40:02 Conor lawlor replied:
I am having the same problem too. I have been banging my head against a wall for a couple of days now. PLeae, Teodor, put me out of my misery!

Here is a sample page: whytes.ie/html5test.html

And the code
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript">
/* dmxServerAction name "HTMLtestExecutor" */
jQuery.dmxServerAction(
{"id": "HTMLtestExecutor", "url": "dmxConnect/api/NewTest.asp", "method": "GET", "sendOnSubmit": false, "sendOnReady": true, "data": {}}
);
/* END dmxServerAction name "HTMLtestExecutor" */
</script><title>Untitled Document</title>
<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataSet.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxServerAction.js"></script>
</head>

<body>
<div data-binding-id="repeat1" data-binding-repeat="{{HTMLtestExecutor.data.queryHTMLtest}}">{{AUCTION}}{{IMAGE}}</div>
<div data-binding-id="repeat2" data-binding-repeat="{{HTMLtestExecutor.data.queryArtists}}">{{FIRSTNAME}}{{LITERATURE}}</div>
</body>
</html>
Replied 04 Mar 2016 18:25:27
04 Mar 2016 18:25:27 George Petrov replied:
Hi Conor,

Somehow the script block containing dmxServerAction is way above all other includes in your head. It should be placed actually before the body end tag. So move the whole block just before </body>

-George
Replied 06 Mar 2016 12:29:35
06 Mar 2016 12:29:35 Conor lawlor replied:
Thanks for the response, George, but I'm afraid it didn't solve the problem. I have two pages, both with the same problem. I implemented your change, and still no joy.
whytes.ie/html5test.html
theoriel.com/expert/artists.html

Could you post a simple page with working code, so I could at least have a target to aim for?
Replied 06 Mar 2016 14:29:41
06 Mar 2016 14:29:41 George Petrov replied:
Hi Conor,

I see you are running Server Connect on ASP server - we have some issues there with the new global debug flag we introduced in the last update. So a new update will be released very quickly now on Monday/Tuesday to fix this.

-George
Replied 06 Mar 2016 16:18:20
06 Mar 2016 16:18:20 Conor lawlor replied:
George

I feel bad that you are replying on a Sunday! Take the rest of the day off:-)

I look forward to the update.

Conor

Reply to this topic