[html5] Large Datalist

Tatham Oddie tatham at oddie.com.au
Thu May 3 23:29:26 PDT 2012


You'll need to put it in a variable to access it later.

    var datalist = {
        "ID": "facilities",
        "OPTION": [
            {"LABEL": "St. Johns Hospital, Oxnard", "VALUE": "St. Johns"},
            {"LABEL": "Pleasant Valley, Camarillo", "VALUE": "Pleasant Valley"},
            {"LABEL": "Los Robles Hospital, Thousand Oaks", "VALUE": "Los Robles"}
        ]
    };

-- Tatham

-----Original Message-----
From: Doug Hardie [mailto:bc979 at lafn.org] 
Sent: Friday, 4 May 2012 4:17 PM
To: Tatham Oddie; help at lists.whatwg.org
Subject: Re: [html5] Large Datalist


On 3 May 2012, at 23:16, Doug Hardie wrote:

> Great idea.  Here is the content of the js file:
> 
> {"DATALIST": {
>        "ID": "facilities",
>        "OPTION": [
>                {"LABEL": "St. Johns Hospital, Oxnard", "VALUE": "St. Johns"},
>                {"LABEL": "Pleasant Valley, Camarillo", "VALUE": "Pleasant Valley"},
>                {"LABEL": "Los Robles Hospital, Thousand Oaks", "VALUE": "Los Robles"}
>        ]
> }}
> 
> Loading it with:
> 
> <SCRIPT SRC=/RSS/bin/facilities.script></SCRIPT>
> 
> I get an "Unexpected token ":" on the first line.  Have I done something wrong?
> 
> 
> 
> On 3 May 2012, at 16:17, Tatham Oddie wrote:
> 
>> Store it as JSON and load it as a .js file?
>> 
>> -- Tatham
>> 
>> 
>> -----Original Message-----
>> From: help-bounces at lists.whatwg.org [mailto:help-bounces at lists.whatwg.org] On Behalf Of Doug Hardie
>> Sent: Friday, 4 May 2012 9:13 AM
>> To: help at lists.whatwg.org
>> Subject: [html5] Large Datalist
>> 
>> I have a large datalist that I would like to store in a file that can be downloaded to the browser when the user first establishes a session and then is used by the browser much like a javascript file.  Is there any way to do that?
>> _______________________________________________
>> Help mailing list
>> Help at lists.whatwg.org
>> http://lists.whatwg.org/listinfo.cgi/help-whatwg.org
>> 
> 




More information about the Help mailing list