All pastes #1891171 Raw Edit

Something

public text v1 · immutable
#1891171 ·published 2010-06-28 15:54 UTC
rendered paste body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
    
    <head>
        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/tundra/tundra.css"
        />
        <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
    </head>
    
    <body class=" tundra ">
        <div dojoType="dojo.data.ItemFileReadStore" url="./countries.json"
        jsId="reloadableStore2" urlPreventCache="true" clearOnClose="true">
        </div>
        <div dojoType="dijit.form.ComboBox" store="reloadableStore2" searchAttr="name">
        </div>
        <div id="reloadButton2" dojoType="dijit.form.Button">
            Reload DataStore
        </div>
    </body>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js"
    djConfig="parseOnLoad: true">
    </script>
    <script>
        dojo.require("dojo.data.ItemFileReadStore");
        dojo.require("dijit.form.ComboBox");
        dojo.require("dijit.form.Button");

        //Now set up a linkage so that the store can be reloaded.
        dojo.addOnLoad(function() {
            dojo.connect(dijit.byId("reloadButton2"), "onClick", function() {
                //Reset the url and call close.  Note this could be a different JSON file, but for this example, just
                //Showing how you would set the URL.
                reloadableStore2.url = "./countries.json";
                reloadableStore2.close();
            });
        });
    </script>
    <!-- NOTE: the following script tag is not intended for usage in real
    world!! it is part of the CodeGlass and you should just remove it when
    you use the code -->
    <script type="text/javascript">
        dojo.addOnLoad(function() {
            if (document.pub) {
                document.pub();
            }
        });
    </script>

</html>