METHOD 1: Using NO scripting (suits
your simple data format)
In your feedback properties, assign the "list join" to the top
right, matching your list join number where you want the data to
append to.
Then above your capture groups, add an "on match" item, and set
the target to list join, again the join of your list, then set the
value to c
This will cause it to create a "content" subpage in the list.
Then in your capture groups, set the data type to serial, and the
join to match the serial joins of the dates used in your list
subpages.
METHOD 2: Using JavaScript - recommend this only if you need to
use more advanced data later on,
Ask your PHP developer to use json_encode on the date array, and
simply print the string result to screen.
The result you see in your browser would be something like this:
[["date 1","date 2"],["date
3","date 4"]]
Then in iViewer, create a script that does something along the
lines of:
function requestDates() {
CF.request("YOUR URL HERE", function(status, headers, body) {
if (status == "200") {
var myData = JSON.parse(body);
CF.listRemove("l1"); // Clear your list of any
previous data, change l1 to match your list join number, prefixed
with lowercase L
// Loop through your data, assigning the info to joins
to use in your list
var newListData = [];
for (var item in myData) {
var dateLine = myData[item];
newListData.push({s1: dateLine[0], s2:
dateLine[1]}); // Change s1 and s2 to match the serial joins of
the items in your list for date 1 and date 2.
}
// Add the data to the list
CF.listAdd("l1", newListData); // Again change l1 to
match your list join
} else {
CF.log("SOMETHING WENT WRONG!");
}
});
}
Save that script into a file called "main.js" then add the script
to your project via the script manager.
Now create a button to call the data, and in the button properties
under "javascript" property, add this:
requestDates();
Depending on how the data is returned via the script, this will
change a bit, but if you need help, simply show us how the JSON
data looks.
By returning JSON data from the PHP script, it makes it much
easier to process in our JavaScript engine.